Programming Languages
AJAX
Subjective
Apr 03, 2013
How do I create a thread to do AJAX polling?
Detailed Explanation
JavaScript does not have threads. JavaScript functions are called when an event happens in a page such as the page is loaded, a mouse click, or a form element gains focus. You can create a timer using the setTimeout which takes a function name and time in milliseconds as arguments. You can then loop by calling the same function as can be seen in the JavaScript example below.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts