javascript:history.back() problem with Netscape Frames

I've experienced a problem when using the javascript:history.back() construct on a site employing Frames and viewed by a Netscape client.  It works fine with MSIE 4.0 but with Netscape, it appears to do something (no errors) but don't perform the back function.  

Is there anyone out here that can offer a suggestion for how to make this function work (or one like it) work for both major browser client software products?

I have tried the javascript:history.go(-1) construct and that didn't work either.  

For whatever reason, as I noted above, back() works 100% of the time with MSIE 4.0 and never with Netscape's browser (4.0n).

Thanks in advance for your assistance.
netbestAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rigansenCommented:
I don't work with IE, but you must know that the history array saves one entry for every frame that is loaded so if you load a page with frames and expect to go back using history.go(..), think that history.go(-1) will work?? well, you're wrong... you'll have to use maybe history.go(-2) or history.go(-3), depending on the number of frames you're working with!!

good luck on this one!!

rigansen.
0
netbestAuthor Commented:
Edited text of question
0
tecbuilderCommented:
The problem is that you are using the history list of the parent and not of the frame and how the history list works with frames.  Instead of history.go(-1) use parent.mainframe.history.go(-1).  Also instead of history.go(1) use parent.mainframe.history.go(1).  Another option is to ue the history.back() or history.forward() functions.

Let me know how this works out for your.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

netbestAuthor Commented:
Ive tried as tecbuilder suggested without success.  The use of javascript:parent.mainframe.history.go(-1) causes an error (parent.mainframe.history is not an object).  I'm not versed on javascript but, is there a possibility that I have to set some other parameter?
0
tecbuilderCommented:
Did you substitute the word 'mainframe' with your frame's name?  If not do this.
0
netbestAuthor Commented:
Just so I don't go off into another wierd loop..  The need is to take the user back to whatever location they came from.  If it was from within the site, fine... if not, it needs to take them back to where ever then came from.  Will the parent.<framename> do this?
0
tecbuilderCommented:
Only if they went somewhere from within the frame.  Did you try using the history.back() and history.forward() functions?  These you would use the same way as you were using the history.go(-1) and history.go(1) functions respectively.
0
tecbuilderCommented:
Only if they went somewhere from within the frame.  Did you try using the history.back() and history.forward() functions?  These you would use the same way as you were using the history.go(-1) and history.go(1) functions respectively and may work better for what you want.
0
netbestAuthor Commented:
I've tried parent.history.back(), history.back(), parent.history.main.back() and the same optioins with go(-1).  When I use the parent.history.back() Netscape and MSIE both send me to the first page behind the site.. even if I've been navigating within the site.

The only thing that works like I want it to (MSIE ONLY)is the javascript.history.back().  It don't seem to care whether it is in a frame or not.  It just takes me back one space in common history.  Netscape thinks it did something (4.04 by the way) but it don't load the previous page.  This sure has become more complecated that I'd hoped it would.
0
tecbuilderCommented:
The information I've given you is all that I know and found.  The only other things left is document.history.back() or self.history.bac().  Otherwise, it may just be a bug within Netscape.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.