Link to home
Start Free TrialLog in
Avatar of hdrik
hdrik

asked on

history.go(-1) for another frame

I have 2 frame. Frame A is for navigation button including back button that works exactly like the browser.
and Frame B is the content of the website.

Question:
How to create a back button that can go to the previous page of the frame B?

TIA
ASKER CERTIFIED SOLUTION
Avatar of DreamMaster
DreamMaster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hdrik
hdrik

ASKER

Max, it didn't work.
Hmm...can you show me the source of your frameset?

It should work...so I want to check...

Max.
Avatar of hdrik

ASKER

----- MAIN.HTML ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
</HEAD>

<FRAMESET cols="100%" rows="10%,*">
  <FRAME marginHeight=1 name=frameA Resize src="navigate.html">
  <FRAME marginHeight=1 name=frameB Resize src="http://myserver/default.asp">
  <NOFRAMES>You must use a browser that can display frames to see this page. </NOFRAMES>
</FRAMESET>
</HTML>

----- NAVIGATE.HTML ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Feedback System</TITLE></HEAD>
<BODY>
<A href="Javascript:parent.frames('frameB').history.go(-1)">BACK</A>

</BODY>
</HTML>

It will work if you load a new page into it first...if you are opening the frameset and try to go back immediately...there's nothing in the history of the frame...as soon as there is...it will be no problem....just tried it out myself..and it works...

Max.
Avatar of hdrik

ASKER

sorry my mistakes.. it works.. Thanks Max..
Anytime hdrik... :)

Thanks for the grade A... :)

Max.