Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pressing "back" using frame

Status
Not open for further replies.

avivit

Technical User
Jul 5, 2000
456
IL
I'm using frames, and when trying to go back by the "back" button
in browser, only one frame is going back.
I used the following link idea, in order to the "back" to bring
back all the frames content, without having to press few times on the "back".


My question:
after I go back, the "farward" button in browser is DISABLED,
when I use this idea.
Why is that? and how will I bring it "back" to life?

Thanks
 
This seems to indicate that the history list has been modified, so some entries have been lost. Perhaps try using the back or go method with indices.Is it to do with the use of the replace method? "Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"
 
This happens because frames represent different web pages and the back button will go back one page at a time. Normally it would go back back by one frame then the main page. Unfortunaltely I don`t know if this can be avoided because I also found it to be quite problematic.
 
Forward becomes disabled because they (in that irt.org script) use replace() function which replaces the existing item on history list. If you'd like to see "forward" button working normally, you should use "location.href='something.html'" instead of replace as they use it:
location.replace('I hope this helped.
---
---
 
Thanks bangers,kgomotso and Rydel.
Rydel: Actualy I did not use the "replace". I did use "location.href".
bangers, I followed your suggestion:
history.back() //same as history.go(-1)
and for netscape: parent.frameName.history.back();
It works great in Ie and NS. Thanks all.

Now - we all know that solving one problem (my main problem) causes another (that I can live with):

1. The forward in ns (NOT ns6) only, is going 1 step forward (IE is perfect). Additional pressing on the "forward" does not effect, as if it's not on the list.
(OF course, if not using the "history.back" and using 2 steps back manually(!), u can forward 2 steps again.)

2. Ie - Can I use something similar, in order to forward 2 steps? Even if I could, when do I do that? can't capture forward pressing right? (at the moment - u have to press the forward twice).

3. Totally other probelm: NS6 does not even need the history.back() for it goes
back (using one "back" press) as the no. of frames.
But it does not forward back though it's not disabled. It has to do with using external links in frames.

Any answer will be most welcome.
 
What are you using already? go(2) should work for both browsers. You can step to any history item by just altering the index. bB "Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"
 
No. history.go(2) does not work for me in this case.
Neither does: var x=2;history.go(x)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top