#1
  1. No Profile Picture
    Kingsky
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,

    I have a webpage (www.moochers.com) where a javascript puts the visitor in the proper frameset if they come to a lone frame.

    The problem is I would like to wipe out the redirect page in the history so that when they hit the back button they can get out and aren't trapped.

    Is there any way to make the 'back' button on the browser go back 2 pages instead of 1? It can't be a link, it has to be the back button.

    I appreciate any help. Thanks.
  2. #2
  3. No Profile Picture
    Spookster
    Guest
    Devshed Newbie (0 - 499 posts)
    You cannot change what the browser back button does. About all you can do is put a button link on the page:

    <a href="javascript:history.go(-2)">GO back</a>

    Spookster
  4. #3
  5. No Profile Picture
    Kingsky
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,

    Thanks for your help, but I figured out how to do it finally. You're right, you can't change what the back button does, but you can overwrite the last page in the history with the current page.

    You just put
    location.replace('whatever_url_you_are_forwarding_to');

    and the last url will be wiped out of memory so when the back button is hit it will 'effectively' go back 2 pages.

    Hope this helps someone.

Similar Threads

  1. block iframe from browser history problem
    By Intra in forum HTML Programming
    Replies: 6
    Last Post: February 26th, 2004, 09:39 AM
  2. disable history for POST requests ???
    By aks444 in forum HTML Programming
    Replies: 4
    Last Post: November 11th, 2003, 04:41 AM
  3. Editable web pages
    By Anjana in forum HTML Programming
    Replies: 1
    Last Post: August 19th, 2003, 05:17 AM
  4. Convert htm pages to php
    By PHPme in forum PHP Development
    Replies: 9
    Last Post: May 30th, 2003, 03:18 AM
  5. user web pages
    By suprtiger in forum Apache Development
    Replies: 0
    Last Post: May 20th, 2003, 08:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo