| | |
dispatching an event using setTimeout
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2007
Posts: 25
Reputation:
Solved Threads: 0
Hello everyone, I've ran into something that's been confusing me. Here's my code snippet:
What happens in Firefox is when the
Thank you,
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
if (parent.scrollTop < parent.scrollHeight) { if(document.fireEvent){ //IE setTimeout("document.fireEvent('onmousemove')", 10); }else{ //FF var changeEvent = document.createEvent("MouseEvents") changeEvent.initEvent("mousemove", true, true); setTimeout("document.dispatchEvent(changeEvent)", 10); } }
setTimeout fires, it tells me that changeEvent is undefined. To me, it seems to be defined. Has anyone run into this before and know how to work around it?Thank you,
Last edited by jmasta; Jan 6th, 2009 at 1:13 pm.
•
•
Join Date: Apr 2007
Posts: 25
Reputation:
Solved Threads: 0
After doing some googling, I found this thread:
http://www.daniweb.com/forums/thread102251.html
which was very similar to mine. I tried ~s.o.s~'s suggestion and it worked very well, and I learned a little bit more about setTimeout. Thank you!
http://www.daniweb.com/forums/thread102251.html
which was very similar to mine. I tried ~s.o.s~'s suggestion and it worked very well, and I learned a little bit more about setTimeout. Thank you!
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Function to find prime numbers
- Next Thread: Tutorial On Creating Powerful Layouts
Views: 1028 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets api blackjack browser bug captchaformproblem checkbox child class close cookies createrange() cursor date debugger dependent developer disablefirebug dom dropdown editor element embed engine events explorer ext file flash form forms game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images internet java javascript javascripthelp2020 jquery jsf jsfile jump libcurl maps margin math matrixcaptcha media mp3 mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming progressbar rated runtime safari scriptlets scroll search security session shopping size software solutions star stars stretch synchronous tweet unicode web webkit webservice window wysiwyg \n





