Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening and Closing Windows Using OnLoad?

    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.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    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.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •