{"id":298,"date":"2010-07-18T08:43:36","date_gmt":"2010-07-18T12:43:36","guid":{"rendered":"http:\/\/erics-test-lab.com\/?p=298"},"modified":"2010-07-18T08:43:36","modified_gmt":"2010-07-18T12:43:36","slug":"coldfusion-and-pausing-javascript","status":"publish","type":"post","link":"https:\/\/www.esearing.com\/v2010\/2010\/07\/coldfusion-and-pausing-javascript\/","title":{"rendered":"Coldfusion and Pausing Javascript"},"content":{"rendered":"<p>I had an interesting problem this week. I had a page with a CFQuery, a CFLoop to output the query, and a javascript function. The problem was that the javascript function was occurring before the loop would draw the output. This kept those objects (Form elements) from being available to the dom. So I needed a way to pause the javascript. <\/p>\n<p>The Solution:<!--more--><br \/>\n<code>&lt;\/cfloop&gt;<br \/>\n&lt;script&gt;<br \/>\nfunction myFunction(){<br \/>\n\/\/do something<br \/>\n}<br \/>\n\/\/ execute myFunction after 2 seconds.<br \/>\nsetTimeOut(myFunction, 2000);<br \/>\n&lt;\/script&gt;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had an interesting problem this week. I had a page with a CFQuery, a CFLoop to output the query, and a javascript function. The problem was that the javascript function was occurring before the loop would draw the output. &hellip; <a href=\"https:\/\/www.esearing.com\/v2010\/2010\/07\/coldfusion-and-pausing-javascript\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,16,12,21,24],"tags":[],"class_list":["post-298","post","type-post","status-publish","format-standard","hentry","category-code","category-coldfusion","category-javascript","category-problems-fixes","category-snippets-quick-code-tips-for-single-elements-attributes-or-details"],"_links":{"self":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":0,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}