?
Solved

IFrame link targeting problem

Posted on 2003-03-26
10
Medium Priority
?
153 Views
Last Modified: 2010-04-09
Hi,

I am using iFrames in my Web pages. There are multiple pages  link 1.html, link2.html, link3.html ... all having similar structure. Each of these  pages have a Logo frame at the top and a menu frame at the left and the remaining page has page specific HTML content. The menu frame contains links to other html pages (link1.html, link2.html etc).

1. The desired functionality is:
When a particular link (eg. linkN.html) is clicked from the menu frame,  the current link.html should get closed and linkN.html should get opened.

2. Instead this is how it is behaving currently:
When linkN.html is clicked the new linkN.html is getting opened in the menu frame of the current link.html.

3. I am giving the sample link1.html code below.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html><body>

<iframe src="logo1.html" name="Logo" width="100%" height="54" scrolling="no"
frameborder="" marginwidth="0" marginheight="0" hspace="0" vspace="0" align=top ></iframe>

<iframe src="menu1.html" id="FolderTreeLeft" name="menu" width="154" height="100%" scrolling="no"
frameborder="" marginwidth="0" marginheight="0" hspace="0" vspace="0" align=left></iframe>

<p> PAGE SPECIFIC CONTENT FOR LINK1 </p>

</body></html>

4. The <a href> tags in the menu1.html looks as below:
<a href="link1.html" > Link1</a>

Am I doing some thing wrong? A solution with sample code will be of great help.

-----
Haribabu




 
0
Comment
Question by:hari_yadlapalli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +4
10 Comments
 
LVL 8

Expert Comment

by:MusicMan
ID: 8211370
The error seems to be that you are not specifiying a target frame for link1.html, so it will load into the frame that it is being called from.

Try <a href="link1.html" target="main"> Link1</a>

replace "main" with whatever the target frame is called.

0
 

Author Comment

by:hari_yadlapalli
ID: 8211494
No That is not what I want ! I don't want to target it to any Frame . As I said  when I click on the linkN.html  the current page "link.html"  should be closed and  a new  page "linkN.html" should open. How do I do that ?
0
 
LVL 17

Accepted Solution

by:
dorward earned 100 total points
ID: 8211926
Sounmds like you want: target="_top"
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:TGHI
ID: 8212754
or, target="_parent" ... this will open the link in the same browser window, out of the frameset.


     www.tghi.n3.net
0
 
LVL 5

Expert Comment

by:kasandra
ID: 8214533
Both dorward and TGHI are correct - either of those will work for you.
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8217329
I agree _top and _paretn work, for a worked example see the code ofany page at http://ww.cardiffrifleclub.co.uk/

As the first correct answer dorward sould get the points i believe (MusicMan was also technically correct but did not provide you with the code you needed to target the paretn frame).
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8820612
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 17

Expert Comment

by:dorward
ID: 8821624
recommendation: Points to me. First with answer and my answer will also work in nested frames. Other experts agree that I was correct.
0
 
LVL 5

Expert Comment

by:kasandra
ID: 8836686
I agree - the points should go to dorward.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9015954
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to dorward -- GRADE A

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

771 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