dwarfthrower
18-01-2005, 09:33 AM
Howdy, I was wondering whether anyone else had run across this little gem of strangeness. In IE, some events don't seem to be handled if another event fires beforehand.
<html>
<head>
<script>
function do_link_onclick(){
alert("do_link_onclick() fired");
}
function do_field_onchange(){
alert("do_field_onchange() fired");
}
</script>
</head>
<body>
<textarea onchange="do_field_onchange()">Change this value</textarea>
<br>
<a href="#" onclick="do_link_onclick()">Now Click Here</a>
</body>
</html>
In Firefox, if you edit the value in the textarea, then click on the link, you get the notification of the onchange event firing, then the notification of the link's onclick event firing. Do the same in IE and only the textarea's onchange event fires.
Has anybody got any ideas about how to get IE to behave rationally in this instance?
<html>
<head>
<script>
function do_link_onclick(){
alert("do_link_onclick() fired");
}
function do_field_onchange(){
alert("do_field_onchange() fired");
}
</script>
</head>
<body>
<textarea onchange="do_field_onchange()">Change this value</textarea>
<br>
<a href="#" onclick="do_link_onclick()">Now Click Here</a>
</body>
</html>
In Firefox, if you edit the value in the textarea, then click on the link, you get the notification of the onchange event firing, then the notification of the link's onclick event firing. Do the same in IE and only the textarea's onchange event fires.
Has anybody got any ideas about how to get IE to behave rationally in this instance?