• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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
0
hdrik
Asked:
hdrik
  • 4
  • 3
1 Solution
 
DreamMasterCommented:
<a href="javascript:parent.frameB.history.go(-1)">Go back on Frame B</a>

Max.
0
 
hdrikAuthor Commented:
Max, it didn't work.
0
 
DreamMasterCommented:
Hmm...can you show me the source of your frameset?

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

Max.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
hdrikAuthor Commented:
----- 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>

0
 
DreamMasterCommented:
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.
0
 
hdrikAuthor Commented:
sorry my mistakes.. it works.. Thanks Max..
0
 
DreamMasterCommented:
Anytime hdrik... :)

Thanks for the grade A... :)

Max.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now