Thursday, December 11, 2008

meta refresh problem in IE7

<meta equiv="Refresh" content="3;url=http://mysite.com">


this meta tag will redirect to the specified url in 3 seconds.
but it won't work in Internet Explorer 7.

BUT...
we can use a script...

<script language=JavaScript>

function Refresher(t) {
if(t) refresh = setTimeout("document.location='http://www.mysite.com';",
t*1000);
}

</script>

Then call it inside body tag..

<BODY onLoad="Refresher(20)">

Cheers!

No comments: