PDA

View Full Version : Back buttons in Netscape frames


deanne
03-01-2001, 10:16 PM
O.K I surrender. I have no idea why this doesn't work and I cannot get it functioning. Any clues would be greatfully recieved.
I can't get Netscape Navigator to use this beautiful little script I desperately need to get working that takes you back to the page from whence you came. It works when other people have used it - at least I can see it in my Netscape Navigator - but I can't get it right when I try to use it. Admittedly they aren't using it in frames and I do need to

Can you give me any clue as to what I have done or not done?
I got it from a1javascripts.com (and where it works)and I'm trying to use it at http://adminwww.flinders.edu.au/teach/assess/design.htm (where it works perfectly in IE, but not in NN)
AAAARGH!
I need to get it happening as people are going to be bouncing in from various different places, otherwise navigation is going to be a nightmare.

nuclear vapid
03-26-2001, 03:26 AM
I assume you want it to navagate your site?

onClick="history.back(1)" name="button" target="_parent">

the problem is the target name has to match the name of the frame you want to change. If it's the mainFrame then it has to be
onClick="history.back(1)" name="button" target="mainFrame">

deanne
03-26-2001, 03:54 AM
The problem is that I wanted to post it in the top frame. In Netscape, it reloads THAT frame, which obviously hasn't changed. I am also using pages that aren't in frames - just to confound issues further. Any clues?

Ian
03-26-2001, 06:07 AM
Hiya deanne, welcome to htmlforums.

give this a try.
change:

onClick="history.back()"

to:

onClick="javascript:parent.frame-name.history.back()"

change "frame-name" to your frameset page name and it SHOULD work for you. (I havent actually tested it).

good luck

deanne
03-26-2001, 06:22 PM
Thanks - that works in NN for travelling between the frames and non frames pages- which is what I really need, but not for the internal jumping, which IE does brilliantly. Seeing as most of the people I am designing for use NN, I think I am going to have to revisit the navigation structure! Thanks anyway