SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: adding to back-button histrory?
-
Aug 22, 2006, 13:51 #1
- Join Date
- Feb 2006
- Location
- Altoona, PA. USA
- Posts
- 1,945
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
adding to back-button histrory?
is there a way i can add history to the back button?
so say they are on the same page but the layout of the page keeps changing but the actual page isnt changing. i want to add something in the history so that if they hit the back button it doesnt take them to the actual last page but the perceived last page.
Thanks
-
Aug 22, 2006, 18:46 #2
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
history
The history object is read-only. So for example if you have a "history" of
www.google.com
www.yoursite.com/index.php
www.yoursite.com/index.php?page=2
www.yoursite.com/index.php?page=3
www.yoursite.com/index.php?page=5
www.yoursite.com/index.php?page=1
and the user hits the back button from "page1" he may go back to google.
I think you could add your own "go back" button and do something like
onclick="history.go('www.yoursite.com/index.php?page=5')"
that might work - if - they use your scripted button and not the browsers back button.Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Aug 22, 2006, 20:25 #3
Originally Posted by halfasleeps
In my niew point you should use cokkies , and on back button read the last cookie you wrote , with the parameter written to check the ststus on which page to redirect.
navtej singh dhillon
-
Aug 23, 2006, 07:30 #4
- Join Date
- Feb 2006
- Location
- Altoona, PA. USA
- Posts
- 1,945
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks guys, im trying to make the back button work like the one at 2advanced.com its a flash site and as your navigate the flash site (which is all one page) the address bar changes adding #description to the end...mine does this too, but on theirs when you hit the back button it takes you to the last #whatever instead of the last page....mine will not take you to the last #whatever but just takes you to the last actual page....ive figured out every aspect of this type of navigation (well in IE im still having problems with FF) accept making the back button work.
you can also view the page im working on if nescasary http://altoonadesign.com/ad2.php
thanks
Bookmarks