Forum Moderators: open

Message Too Old, No Replies

Open new browser window after refresh page

         

turtle1353

5:23 pm on Dec 29, 2005 (gmt 0)

10+ Year Member



Hey Javascript gurus!

Is this possible? What I'm trying to accomplish is...

I would put a <meta http-equiv="Refresh" content="2; URL=this_page"> or something like that and then after the page refreshes, a new window spawns with url I want pointing to.

Is there a way without refreshing the page?

Thanks a lot!

kaled

10:24 am on Dec 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So you're trying to create a popup window?

Kaled.

turtle1353

5:18 pm on Dec 30, 2005 (gmt 0)

10+ Year Member



Hi Kaled,

Yeah sorta like a pop up you can say. I found something on the MS knowledge base that worked pretty good!

<SCRIPT LANGUAGE="JavaScript">
<!--
function wait()
{//this function is called by the BODY onLoad event

//calls the launch() function
//and sends it the URL parameter after 30 seconds

//edit the URL parameter to point to the web page to be opened
setTimeout("launch('SomePage.htm')", 30 * 1000);}

function launch(URL)
{//this function is called by the wait() function

self.name = "opener";

//opens another browser window to the specified URL parameter
//new window opens to the specified size
remote = open(URL, "remote",
"resizable,scrollbars,width=550,height=150,left=50,top=50");}

// -->
</SCRIPT>

<BODY onLoad="wait()">blah blah...</body>