Solved

history.go(-1) for another frame

Posted on 2001-08-31
7
229 Views
Last Modified: 2010-05-19
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
Comment
Question by:hdrik
  • 4
  • 3
7 Comments
 
LVL 19

Accepted Solution

by:
DreamMaster earned 100 total points
ID: 6443920
<a href="javascript:parent.frameB.history.go(-1)">Go back on Frame B</a>

Max.
0
 

Author Comment

by:hdrik
ID: 6444047
Max, it didn't work.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6444058
Hmm...can you show me the source of your frameset?

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

Max.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:hdrik
ID: 6444082
----- 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
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6444100
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
 

Author Comment

by:hdrik
ID: 6444105
sorry my mistakes.. it works.. Thanks Max..
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6444112
Anytime hdrik... :)

Thanks for the grade A... :)

Max.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
css, html 5 42
compact pure CSS Read More Toggle 4 58
HTML5 Get data in table rows 5 26
Wordpress plugins not working in html 3 19
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question