wrynn
asked on
how do i assign an onchange function to a select field within my javascript code?
i want to dynamically assign an onchange function to a select field in my javascript code.
so lets say i have this code:
function eventHandler(param1) {
doSomeStuff(param1);
}
selectField.onchange=event Handler("b lah");
obviously this is the wrong way, what is the correct way?
selectField.onchange = function() { eventHandler("blah"); }
is this the correct way?
so lets say i have this code:
function eventHandler(param1) {
doSomeStuff(param1);
}
selectField.onchange=event
obviously this is the wrong way, what is the correct way?
selectField.onchange = function() { eventHandler("blah"); }
is this the correct way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.