Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / February 2005



Tip: Looking for answers? Try searching our database.

Prevent a javascript function from executing twice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vijay - 27 Feb 2005 14:58 GMT
hi,

I have a select dropdown and 5 text fields. based on the option
selected (which are the units - cm/mm/inches/ft/yard etc), i change
the values in the text fields using javascript to the corresponding
units.

my problem is that when the options are selected very quickly(for eg
using the keyboard's up/down keys) then quickly, the text field values
lose their connection with the select box and the values become
illegal.
I suspect that the javascript function is being called even before the
earlier execution has not terminated.
I tried using a global variable and using it as a lock, but still no
success.

What possibly am i doing wrong here?

Thanks for any help
RobG - 27 Feb 2005 20:17 GMT
[...]

> What possibly am i doing wrong here?

 Without a small code sample showing the behaviour, we're just
 guessing.  Can you provide a hint?

Signature

Rob

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.