Results 1 to 4 of 4

Thread: modifying back button

  1. #1

    Thread Starter
    Addicted Member Mrs Kensington's Avatar
    Join Date
    Sep 2001
    Location
    Dorset, UK
    Posts
    144

    modifying back button

    I need to be able to change the page that the back button points to. I've tried doing

    Code:
    document.history.previous = 'http://www.microsoft.com'
    but that doesn't work.

    i also tried
    Code:
    document.history(-1) = 'http://www.microsoft.com';
    which didn't work (though i wasn't surprised at that)

    and printing out (with document.writeln) the contents of many other index's but to no avail!

    I know alot of people think this is evil but I have good reason for wanting to do it. IM EVIL!!!!

    any help would be greatly appreciated
    Mrs K
    Last edited by Mrs Kensington; Oct 30th, 2001 at 06:28 AM.
    Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!

  2. #2
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    Hi Mrs K,
    Found this in MSDN - Online. Maybe it'll be of use to ur requirement.
    Code:
    <A HREF="next.html" onclick="javascript:location.replace(this.href); event.returnValue=false; event.cancelBubble=true;">
    Click here to navigate to the next page without adding the current page to the history stack.
    </A>
    ...or maybe not?

    - Jemima.
    Last edited by JemimaChadwick; Oct 30th, 2001 at 09:35 AM.

  3. #3
    scoutt
    Guest
    I was going to say that you can only go back if the page is in the history. if not you can only go forward to a new page, but tell them to go back and maybe they will think they are going backwards. lol

  4. #4

    Thread Starter
    Addicted Member Mrs Kensington's Avatar
    Join Date
    Sep 2001
    Location
    Dorset, UK
    Posts
    144
    Brilliant that works perfectly, in fact its a better way round the problem than the way i was trying!

    just noticed a mistake though, its not your fault its the "clever" messageboard software that splits java and script when its put inside code blocks

    onclick="java script:location.replace(this.href...

    should be

    onclick="javascript:location.replace(this.href...

    again thanks alot Jemima

    Mrs K
    Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!

Posting Permissions

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



Click Here to Expand Forum to Full Width