When you place return false in a function it does not stop execution of queued up events.. It only stops execution of that function... In this regard, IE is actually doing the wrong thing - it should display both alerts...
You could try setting if you wanted to be a certain amount of time between alerts, you could try something like this... It will only display an alert if the last one was more than 1 second ago
- HTML: Select all
<script type="text/javascript">
function blurEvent()
{
test();
return false
}
function clickEvent()
{
test()
return false;
}
var waitForMe = false; // this will tell us if there was an alert recently
function test()
{
if (!waitForMe){
alert("you are wrong");
waitForMe = true; // set this to true so the alert won't run again until waitForMe is false
}
setTimeout('waitForMe=false', 1000); // set back to false after one second.
}
</script>