faqts : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

49 of 92 people (53%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How to handle two event at the same time (Onchange + Onclick)

Apr 26th, 2001 16:00
Colin Fraser, Badis Haif,


Why would you want to? the onChange event implies that an event 
occurs or alert be given when a preset value changes. The onClick event 
gives the user control over those events via a button or other cue. What 
you may want to try is to call two functions with the one event like :
   onClick="function1();function2()"...
This should work as long as the functions are properly available to the 
event handler.