Click to See Complete Forum and Search --> : Pop-up behind window


itheperson
07-28-2003, 06:07 PM
I've seen a script that opens a pop-up on loading of a page but behind the window (so it doesn't cover what they want to see), but i've lost it. anyone got one?

thanks.

xataku_nakusute
07-28-2003, 06:12 PM
on the page you want your pop-up to come up on:

<script type="text/javascript">
function popup()
{
window.open("url","page_name","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=585, height=300");
}
</script>
</head>
<body onload="popup()">

then, in your popup code:

<body onload="self.blur()">

itheperson
07-28-2003, 06:27 PM
The point in my thread was so the pop-up opened *behind* the window ;)

also, sorry i forgot to say the pop-up is an external site.

thanks.

xataku_nakusute
07-28-2003, 07:44 PM
then try:

<html>
<head>
<script type="text/javascript">
function popup()
{
popup = window.open("url","page_name","toolbar=no, location=no,

directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,

copyhistory=no, width=585, height=300");
popup.document.write("<body onload='self.blur\(\)'>");
}
</script>
</head>
<body onload="popup(); self.focus()">
</body>

xataku_nakusute
07-28-2003, 07:48 PM
ive tested it out already and it should work

xataku_nakusute
07-28-2003, 08:52 PM
yeah, it works