A
alvinwoon
Hi guys,
I find it frustrating that I need to sniff out IE to make event
handler for the form's select element work across different browsers.
Here's a summary of what I have right now:
var select = /*get the form select element*/
var option = /*get all the option elements*/
if(document.all){
addEvent(select,"change",executeFunction);
}
else{
addEvent(option,"click",executeFunction);
}
FYI, I am using John Resig's addevent.
Any advises would be much helpful. Thanks
I find it frustrating that I need to sniff out IE to make event
handler for the form's select element work across different browsers.
Here's a summary of what I have right now:
var select = /*get the form select element*/
var option = /*get all the option elements*/
if(document.all){
addEvent(select,"change",executeFunction);
}
else{
addEvent(option,"click",executeFunction);
}
FYI, I am using John Resig's addevent.
Any advises would be much helpful. Thanks