#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    71
    Rep Power
    15
    I made page that redirects user to another page 2 seconds after loading, but I actually need it to go back two pages from history.
    How should I modify this line:
    <meta http-equiv="Refresh" content="2; URL=http://mysite.com/submit.html">
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    London, England
    Posts
    251
    Rep Power
    15
    I don't think you can do that from a REFRESH, you have to use JavaScript.

    <html>
    <head>
    <title>JS History test</title>
    </head>

    <body onLoad="history.go(-2)">
    <h1>Goodbye!</h1>
    </body>

    </html>

    --------------------

    Important points:

    1. Not all browsers use JavaScript or will have their JS turned on.

    2. The browser history stores clicks and not necessarily pages, so you may run into trouble if you have anchor targets within the intermediate pages. If not, then it should go back two pages.

    3. This sort of thing is nearly always a bad idea anyway. Just what are you trying to do? I have a hunch that your users will be confused and/or irritated. It is *they* who should be in control!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    71
    Rep Power
    15
    Thanks for a code.
    Purpose of script is to send user back to form page, after entering wrong password, and then requesting password to be sent by email
    I'm sending them this way because data that they already filled in form will remain.

    [This message has been edited by Pepe (edited June 17, 2000).]
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>I'm sending them this way because data that they already
    >>filled in form will remain.

    I see your point. You should realize redirecting them back to the form page will make them to start filling the fields all over again.

    Have you ever seen guestbook preview page? It basically carry the original form fields over to that preview page. As for your case, you can use hidden fields to carry the correctly filled fields over and require them to re-enter whatever missing fields or incorrect field (wrong password in your case).

IMN logo majestic logo threadwatch logo seochat tools logo