Hi,
Does anyone know of a forward and back button script that will work well in IE and Netscape?
TIA
Peter
| SitePoint Sponsor |


Hi,
Does anyone know of a forward and back button script that will work well in IE and Netscape?
TIA
Peter
Thread Closed - Before and After.
www.Gods101.co.uk - Affordable Quality.
www.scepticism-inc.com - All extremists should be taken out and shot!





You can have a look at this :
http://www.kevjudge.co.uk/fwdback.htm
or have look at the useful resource base at http://developer.irt.org/script/history.htm and hopefully find your answer there.




Hi Peter & Shin Ma,
history.go(-1) returns to the previous page
history.go(1) goes to the next page
history.go(0) refreshes/reloads the current page (I use it a lot when working with dynamic selection lists and netscape)
note for the first two to work there need be previous and next pages. you can insert any number within the parentheses. For example, history.go(-2) will go back 2 pages from the current one.
Placing the history.go(0) in an onLoad event handler will cause the page to fall into a loop. So, if you ever use it, do so only within a function that does not get called within the loading process.
Hope this clarifies some.
Vinny
moderator at:Webxpertz Forums

Hello there,
Continuing the theme of back and forward buttons:
Does someone know how to disable the back button so that user's cannot press it, please?
Regards,
Ed
Strictly speaking, you can't. Browser's don't let you mess with the page history for security reasons.
Your only alternative would be to pop up a new browser window (using the window.open() property to prevent history from being copied to the new window).
Using the location.replace() method, you can create links that replace the current page in the browser history, rather than adding a new entry to the history. If you made all the links on your site with this technique, then you could prevent users from navigating backwards within your site.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference

thanks kevin!!!




Hi,
You can also try putting a var in each page (eg, pageNum or DocName) and then in the body tag use the onload event handler to call a function that checks the value of the opener's variable. If it's higher than the one found in the current page, href the user to the appropriate page.
Vinny
moderator at:Webxpertz Forums





Check out http://www.devshed.com/Talk/Forums/F...ML/000715.html for a good IE method also.
Bookmarks