View Full Version : automatic popups


HardyzGurL87
01-14-2003, 01:06 AM
how do you make a page AUTOMATICALLY popup right when the user opens a page?

starlet
01-14-2003, 01:37 AM
in the head section


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=0,width=300,height=300');");
}
// End -->
</script>

in the body tag

<BODY onLoad="javascript:popUp('http://www.site.com/page.html')">

Take out any silly line breaks and make sure javascript is one word not 2, the forum messes up javascript code sometimes....

HardyzGurL87
01-14-2003, 01:44 AM
i didn't work :-( i must of messed it up. gah, i've been trying to get this to work for houuurrsss...

starlet
01-14-2003, 01:48 AM
try veiwing the source here (http://www.``````````````/lala.html) and copying it, as you can see the code does work. Be sure to change the popups URL so it opens the page you want it to etc...

HardyzGurL87
01-14-2003, 02:14 AM
thanks! :-) it worked. i had just screwed up something in the code somehow.. but it works now.