auto hide popup with some delay

April 12, 2009 at 2:31 am | In Js/Ajax | Leave a Comment
Tags: , , , ,

write this code in parent window

function hideshow() {
sd=window.open(‘http://lalit241.wordpress.com’,'NewWin’,'toolbar=no,status=no,width=350,height=135′)
sd.moveTo(10,10);
}

</script>
</head>
<body onload=”hideshow()”>

Write this code in popup window

<script language=”javascript”>
var sec = 0;
function moveWin() {
sec++;
if (sec == 2) { window.blur(); }
if (sec == 3) { window.focus(); moveTo(10,350); }

window.setTimeout(“moveWin();”, 1000);
}

</script>
<body onLoad=”moveWin();” bgcolor=”#ffff00″>

No Comments Yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.