PDA

View Full Version : need help with javascript


xxweekxx
11-05-2002, 04:57 PM
how do i make a popunder load after like 20secs?

I mean loading the popunder AFTER a specified time AFTER the user closes the main page, is this possible?

Sureal
11-05-2002, 04:59 PM
check out www.javascript.internet.com
they will have what you need

Simonbalk
11-05-2002, 05:03 PM
it's easy. I can make it for you. (if you want ofcource) :D

xxweekxx
11-05-2002, 05:04 PM
Originally posted by Simonbalk
it's easy. I can make it for you. (if you want ofcource) :D

yeah do

and ive checked out javascript.internet.com but all the ones they have only work if the user keeps the main site open.

Simonbalk
11-05-2002, 05:16 PM
Here's the script:


<script language="javascript">
setTimeout("openPopunder('http://www.goodtgpscripts.com' , 750,560, 'popunder')",20 * 1000);
function openPopunder(URL, x, y, name){
aWindows=window.open('', name,"toolbar=yes,width="+x+",height="+y+",status=YES,scrollbars=YES,resize=YES,menubar=yes, toolbar=yes");
aWindows.blur();
aWindows.location = URL;
top.window.focus();
}

</script>



It works fine for me :)

xxweekxx
11-05-2002, 05:18 PM
[QUOTE]Originally posted by Simonbalk
[B]Here's the script:


<script language="javascript">
setTimeout("openPopunder('http://www.goodtgpscripts.com' , 750,560, 'popunder')",20 * 1000);
function openPopunder(URL, x, y, name){
aWindows=window.open('', name,"toolbar=yes,width="+x+",height="+y+",status=YES,scrollbars=YES,resize=YES,menubar=yes, toolbar=yes");
aWindows.blur();
aWindows.location = URL;
top.window.focus();
}

</script>




how do i change the time? and what if the person closes your page does the pop under still open?

Simonbalk
11-05-2002, 05:22 PM
the "20 * 1000" means 20 times a second it has to wait. If you change it into "10 * 1000" it will wait 10 seconds before pop under

xxweekxx
11-05-2002, 05:24 PM
Originally posted by Simonbalk
the "20 * 1000" means 20 times a second it has to wait. If you change it into "10 * 1000" it will wait 10 seconds before pop under

and if they close the page that has the script before 20 seconds what happens?

xxweekxx
11-05-2002, 05:25 PM
what i wanted was a popunder that will open in like 20 secs after the user closes my page. is that possible?

Simonbalk
11-05-2002, 05:26 PM
it will do nothing.

Simonbalk
11-05-2002, 05:27 PM
If you put this into you html page, the page will popunder when the page will be closed

<body onunload="openPopunder('http://www.goodtgpscripts.com' , 750,560, 'popunder')" >

xxweekxx
11-05-2002, 05:39 PM
Originally posted by Simonbalk
If you put this into you html page, the page will popunder when the page will be closed

<body onunload="openPopunder('http://www.goodtgpscripts.com' , 750,560, 'popunder')" >


exactly. .now how do i delay that popunder?

xxweekxx
11-05-2002, 06:06 PM
didnt work. .errors/

trip
11-05-2002, 09:52 PM
naaaa

just go to trixscripts.com and take MAX


:cool:

Simonbalk
11-06-2002, 10:56 AM
Strange. It all works fine in my browser IE 6.