-
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!!!! :D
any help would be greatly appreciated
Mrs K
-
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.
-
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 :D:D
-
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