SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
-
Oct 19, 2000, 05:47 #1
- Join Date
- Apr 2000
- Location
- Winchester, Hampshire, England
- Posts
- 240
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
Does anyone know of a forward and back button script that will work well in IE and Netscape?
TIA
PeterThread Closed - Before and After.
www.Gods101.co.uk - Affordable Quality.
www.scepticism-inc.com - All extremists should be taken out and shot!
-
Oct 19, 2000, 06:53 #2
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
-
Oct 19, 2000, 11:09 #3
-
Oct 21, 2000, 16:27 #4
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
Where the World Once Stood
the blades of grass
cut me still
-
Oct 22, 2000, 15:02 #5
- Join Date
- Jun 2000
- Posts
- 165
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Oct 22, 2000, 15:20 #6
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
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
-
Oct 22, 2000, 16:23 #7
- Join Date
- Jun 2000
- Posts
- 165
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks kevin!!!
-
Oct 22, 2000, 16:26 #8
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Oct 22, 2000, 16:50 #9
- Join Date
- Oct 2000
- Location
- Austin, TX
- Posts
- 1,438
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Check out http://www.devshed.com/Talk/Forums/F...ML/000715.html for a good IE method also.
Bookmarks