Page 1 of 1

Popup Page

Posted: Fri Dec 24, 2004 7:53 am
by coco
Once your page loads, after the number of seconds you define, a popup window will open.

<!-- TWO STEPS TO INSTALL POPUP PAGE:

1. Copy the coding into the HEAD of your HTML ****
2. Add the onLoad event handler into the BODY tag -->



<head>

<script type="text/javascript" language="JavaScript">
<!-- Begin
function popupPage() {
var page = "http://www.8sky.info/popup.html";
windowprops = "height=500,width=500,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

window.open(page, "Popup", windowprops);
}
// End -->
</script>

</head>



<body onload="setTimeout('popupPage()', 5000);">

</body>

Posted: Fri Feb 24, 2006 11:40 am
by kaos_frack
if you change 'setTimeout' to 'setInterval' a new pop-up will open every 5 seconds, lol

Posted: Mon Mar 27, 2006 7:57 am
by znad
thanks for this code I will use it in my site :?

Posted: Fri Mar 31, 2006 12:51 pm
by kaos_frack
also you can determine if your popup window has been blocked or not
like this:

var win1 = window.open(sumtin, sumtin1, sumtin2);
if(win1.closed)
{
alert("Ouch, you need to disable your popup blocker!");
}

lol

Posted: Fri Mar 31, 2006 7:44 pm
by AndersW
can't wait to use this!

Posted: Mon Apr 24, 2006 3:50 pm
by EnacheVladian
isnt this annoying for your visitors ?

personally i wont ever come back to a site who does this kind of things

Posted: Tue Apr 25, 2006 12:02 am
by sethamin
EnacheVladian wrote:isnt this annoying for your visitors ?

personally i wont ever come back to a site who does this kind of things
Me either. I despise popups as I thought everyone else did. :evil:

Posted: Mon May 15, 2006 7:09 am
by Lixas
kaos_frack wrote:also you can determine if your popup window has been blocked or not like this:

Code: Select all

var win1 = window.open&#40][/quote]
This is sometime usefull to know, is user blocking popups or not, when creating sophisticated web systems were sometimes you need to open popup on <Body onLoad...> method, so you can tell user that he would allow popups for my site. But i dont use popups very often, i only use them for previewing how form's data will look like on page. But i think sometimes it's valuable