View Full Version : Opening and Closing Windows Using OnLoad?

08-28-2007, 08:35 PM
I have page that I am trying to link to another URL (that will set a cookie) and then immediately go to another page. I've tried to get the page to load one URL and then go to the next URL, but I can't get that to work. I honestly don't even know how to begin or how to do it. Any suggestions would be greatly appreciated. :)

08-28-2007, 08:50 PM
I think you need something as simple as:

document.location.href = "newPage.html";

Pop up windows will be blocked by browsers and you can not close a window you did not open with JavaScript.


08-28-2007, 09:43 PM
I am not trying to close the window. I just need to have the page load long enough for it to establish its cookie and then go on to another URL in the same window.