表单提交上的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
最满意答案
寻求,你会发现。
在一位同事的帮助下,我们对此进行了整理。
我没有亲眼看到的诀窍是首先将所需信息加入到一起, 然后 连接到 -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.
相关问答
更多-
连接表连接3个表?(Junction Table to connect 3 tables?)[2023-05-11]
是的,你走在正确的轨道上。 如果它是正确的: 一个部门可以有几个类别,一个类别总是连接到一个部门 一个类别可以包含几个项目,一个项目始终连接到一个类别。 然后你应该做这样的模型: 部 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- ... -
Oracle Connect By(Oracle Connect By)[2022-01-18]
似乎循环是问题所在。 通过在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 CONNECT BY行为(Oracle CONNECT BY behaviour)[2022-05-14]
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.