首页 \ 问答 \ 表单提交上的setTimeout返回'not a function'错误(setTimeout on form submission returning 'not a function' error)

表单提交上的setTimeout返回'not a function'错误(setTimeout on form submission returning 'not a function' error)

我有以下内容:

var thiscode = {
init: function(){
    jQuery('#submit').bind('click',thiscode.clickListener);
},

clickListener: function(event){
    setTimeout('document.myform.submit()',5000);
    return false;
}
};
thiscode.init();

setTimeout正在工作,但是当它触发时,我得到这个:“document.myform.submit不是一个函数”。

知道为什么和/或如何解决它?


I have the following:

var thiscode = {
init: function(){
    jQuery('#submit').bind('click',thiscode.clickListener);
},

clickListener: function(event){
    setTimeout('document.myform.submit()',5000);
    return false;
}
};
thiscode.init();

setTimeout is working, but when it fires, I get this: "document.myform.submit is not a function".

Any idea why, and/or how to fix it?


原文:https://stackoverflow.com/questions/3916915
更新时间:2023-11-04 09:11

最满意答案

寻求,你会发现。

在一位同事的帮助下,我们对此进行了整理。

我没有亲眼看到的诀窍是首先将所需信息加入到一起, 然后 连接到 -statement。

我认为下面的代码解决了所描述的问题。

select parent_task.* 
    from (
    select  parent_task_id, item_id, task_id, level
        from (
            select 
                task.task_id parent_task_id, 
                task_item.item_id, 
                item.task_id task_id
            from 
                task, task_item, item
            where 
                task_item.task_id = task.task_id
            and 
                item.item_id = task_item.item_id) properly_structured_parent_table    
        start with task_id = :TASK_ID
        connect by prior parent_task_id = task_id 
    ) task_hierarchy, task parent_task
where parent_task.task_id = task_hierarchy.task_id;

内部的SQL构建了一个合适的parent_table。 下一个使用先前连接构建层次结构。 最外层的SQL根据应用程序的需要加入其余数据。

感谢您的时间和反馈。


Seek and you shall find.

With the help of a colleague we sorted this out.

The trick I hadn't managed to see for my self is to first join the required information together, then do the connect to-statement.

I think the code below solves the problem as it's described.

select parent_task.* 
    from (
    select  parent_task_id, item_id, task_id, level
        from (
            select 
                task.task_id parent_task_id, 
                task_item.item_id, 
                item.task_id task_id
            from 
                task, task_item, item
            where 
                task_item.task_id = task.task_id
            and 
                item.item_id = task_item.item_id) properly_structured_parent_table    
        start with task_id = :TASK_ID
        connect by prior parent_task_id = task_id 
    ) task_hierarchy, task parent_task
where parent_task.task_id = task_hierarchy.task_id;

The inner mot SQL builds a proper parent_table. The next build a hierarchy using connect by prior. The outermost SQL joins in the rest of the data as required in the application.

Thank you for your time and feedback folks.

相关问答

更多
  • 是的,你走在正确的轨道上。 如果它是正确的: 一个部门可以有几个类别,一个类别总是连接到一个部门 一个类别可以包含几个项目,一个项目始终连接到一个类别。 然后你应该做这样的模型: 部 Id | Name ---|------- 1 | Physics 2 | Chemistry 类别 Id | DepartmentId |Name ---|--------------|----- 1 | 1 |Heat 2 | 1 |... 项目 Id | Categ ...
  • 实现递归查询的SQL标准方式(例如由IBM DB2和SQL Server实现 )是WITH子句。 有关将CONNECT BY转换为WITH (技术上是递归CTE )的一个示例,请参阅此文章 - 该示例适用于DB2,但我相信它也适用于SQL Server。 编辑:显然,原始的查询器需要一个具体的例子,这里是一个来自IBM网站的我已经给出的URL。 给一张桌子: CREATE TABLE emp(empid INTEGER NOT NULL PRIMARY KEY, name ...
  • 寻求,你会发现。 在一位同事的帮助下,我们对此进行了整理。 我没有亲眼看到的诀窍是首先将所需信息加入到一起, 然后 连接到 -statement。 我认为下面的代码解决了所描述的问题。 select parent_task.* from ( select parent_task_id, item_id, task_id, level from ( select task.task_id parent_task_id ...
  • 使用Class.forName(“oracle.jdbc.driver.OracleDriver”)首先加载驱动程序。 而oracle jdbc驱动程序jar文件应该在你的$ CLASSPATH中 Finally found R works for me while my company blocks too many things. And R is very fast. Here's the solution: Step 1: Download .jar for ojdbc, need to choos ...
  • 如果有多个表,您应该尝试使用带有NETWORK_LINK的 expdp 像这样的东西: expdp test/test@oracle1 tables=tmp_table,tmp_table2 network_link=oracle_2 directory=TEST_DIR dumpfile=tmp.dmp logfile=expdptmp.log If there are more than a couple of tables you should try to do it using expdp wi ...
  • 试试像这样: import pyodbc connectString = 'Driver={Microdsoft ODBC for Oracle};Server=:/.;uid= ;pwd=' cnxn = pyodbc.connect(connectString) 阅读一些文档;) https://sites.google.com/site/bcgeopython/examples/getting-the-pyodbc- ...
  • 似乎循环是问题所在。 通过在CONNECT BY子句中使用PRIOR运算符查看列来检测循环。 要打破这样的循环,您需要添加一些非常简单的条件,但在其他列上使用PRIOR运算符。 例如:添加到CONNECT BY子句中 and prior emp_id is not null (假设emp_id永远不能为空)。 It seems cycles are the problem. Cycles are detected by looking at the columns with the PRIOR opera ...
  • Oracle如何识别分层查询中的“周期”? 如果记录在案,那就不太好了。 无论如何,我认为我们在OTN讨论中找到了正确而完整(并且非常简单)的答案: https : //community.oracle.com/thread/3999985 无论如何:当您运行分层查询时,对于生成的每一行,Oracle将查看由 connect by 方子句中的PRIOR运算符操作的列,并且仅查看这些列,以查看新生成的行是否与已经匹配的列现有的。 这就是为什么“按水平<= 100的双连接选择5”有效,即使它生成相同的行100次 ...
  • 从这里下载PHP扩展(确认PHP版本并下载相同的,线程安全[TS]版本): http : //pecl.php.net/package/oci8/2.0.8/windows 你应该能找到三个.dll php_oci8.dll,php_oci8_11g.dll和php_oci8_12c.dll 将所有dll放在扩展目录中,在WAMP中它通常是wamp\bin\php\php5.*.*\ext 从系统尝试wamp服务器打开php配置并添加以下行: ; Enable only which is required ...
  • 它将确保您安装的oracle客户端是32位。 It would make sure that the oracle client that you have installed is 32bit.

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。