RE: [PHP] History & the back button
| From: | Boget, Chris | Date: | Thu, 27 Jul 2000 13:11:33 +0000 |
| Subject: | RE: [PHP] History & the back button | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8546@lists.php.net to get a copy of this message | ||
> Now to my question. How do I stop a "back button" from
> re-using this link after it has been done once already?
> I have tried the javascript:
> [onclick window.location.replace="different url"] but when I
> do this, it actually changes the url before it is sent back to PHP
> so the action never happens!
Just add to either the top or the bottom of each page the javascript
code:
history.forward()
The first time you go to a page, there will be no forward history.
However, if the user presses the back button to go to the previous
page, there will be a forward history and they will be taken to the
page they just left.
Chris