|
|
#1 (permalink) |
|
Moo indeed.
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
|
JavaScript- How to Stop all currently executing JavaScript?
Hey guys,
Javascript problemo: Ive javascripted up my own little nice expanding menu, and it works great! well... 95% great. If I do abusive testing of it (ie. click on it repeatedly to get it to change direction from it unfolding to folding up), it won't do anything unless its completely finished unfolding or folding. Now I assume this is because it is executing the unfolding script and won't allow anything else to happen till thats done... well I want it to stop what its doing and start folding it up again! So I was wondering if there is a way to stop all currently executing JavaScript, so that it can allow the function I want to run, to run immediately. I've looked at window.stop() but I don't think that stops JavaScript execution. Let me know what you guys think, KC P.S. Im about to post another question about coding for UNSELECTABLE text.
__________________
|
|
|
|
|
|
#2 (permalink) |
|
Da House Nerd
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
|
I think depending on your browser, input events such as mouse clicks maay be handled by one thread, that executes the related event. In that case there is no way to stop the ongoing operation, because only when the operation will finish, the thread will notice there is a new request for cancellation or something.
__________________
Linux virusscanner detected a virus: Windows 95 ... delete [Y/n] y ~ ~ :wq |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|