PCTechTalkhttp://www.pctechtalk.com/forums/

Go Back   PCTechTalk > PC Tech > Web Related

Reply
 
LinkBack Thread Tools Display Modes
Old 08-13-2005, 10:48 AM   #1 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
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.
__________________
killer_cow is offline   Reply With Quote
Old 08-13-2005, 01:07 PM   #2 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
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
greffov is offline   Reply With Quote
Old 08-14-2005, 09:49 AM   #3 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
hmmmm, yeh I was actually very much thinking that myself, but was trying to be optimistic

Oh well, I suppose I could survive with a 95% good menu

Thanks anyhoo.
__________________
killer_cow is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 09:03 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
2001 PCTechTalk