dwarfthrower
Programmer
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.
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?
Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
Code:
<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?
Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.