Filed Under: General

Creating a popup window

12 May 2008 No Comment Tags: , ,

If you want to create a popup window to inform people about something before they visit a site, then it’s clearly a good way to use body onload in combination with javascript.


Use this little snippet inside your tag:

<script type="text/javascript">
function poponload()
{
ewindow=window.open("http://yoururl.com","mywindow1",
"location=1,status=1,scrollbars=1,
width=800,height=800");ewindow.moveTo(0,0);
}
</script >

And call it via the body tag.

<body onload="poponload()">






Like our posts? Then subscribe via Mail:

Email:  

Similar Posts:

Socialize:

delicious stumbleupon

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.com.