...

View Full Version : onblur doesnt work in IE6, IE7



stynak
12-09-2010, 10:56 AM
I have a problem with one simple script, which works in every browser, just not in IE6 and IE7. You can see the script at http://bbtalk.eu/iframe.html - when you click on the iframe, you should see "clicked at the bottom". But it doesnt work in IE6 and IE7. Do anyone know how to fix that? Thank you

Philip M
12-09-2010, 11:21 AM
Show your relevant code please.

stynak
12-09-2010, 11:24 AM
<script type="text/javascript">
var mousein=0;

function clicked(){
alert("It works");

}

$("iframe").bind('mouseover', function(){mousein=1;});
$("iframe").bind('mouseout', function(){mousein=0;});

$(window).bind("blur",function(){
if(mousein==1){ clicked();}
});
$(window).bind("mousemove",function(){$(window).focus();});
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum