SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirecting page after password

    Hey All,

    I have a page, that has a "Management" link. When the user clicks on it, it pops up a little html page, prompting for a password.

    I want to have it so that if the user enters the correct password, the main page (where they clicked on Management) will redirect to the new page.

    How can I do that? It should be simple, but I'm not sure how to point the other page the way I want to.

    Thanks.

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to use something like opener.location to refer to the previous window
    e.g. opener.location.href="newurl.htm"

    However I'm not sure how cross-browser friendly that is and you may need to experiment.


    Andy
    From the English nation to a US location.

  3. #3
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So if a small popup windows displays, with a password prompt, can I set it up so that the redirect is on the previous, "main" page (not the popup)?

    Thanks.

  4. #4
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you could just in the popup page do this!

    parent.location.href='someUrl';

  5. #5
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That doesn't work. It redirects the new URL in the current popup window ..

  6. #6
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try opener.location.href="newurl.htm" ?
    From the English nation to a US location.

  7. #7
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet, that worked. Thanks!

    Funny, I've never seen "opener" used before.

    Thanks Again.

  8. #8
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kraftomatic
    Funny, I've never seen "opener" used before.
    Well like I said earlier, I'm not sure if that will work across all browsers and that may be the reason why. I can't find any definitive answer on which browsers support it and which don't so you may want to experiment with it some before going live.

    Andy
    From the English nation to a US location.


Bookmarks

Posting Permissions

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