|
|
 |
June 25th, 2007, 07:06 PM
|
#1
|
|
New Member
Join Date: Jun 2007
Location: Nottingham, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Why do links in a frame open a new window?
Hi Everyone.
I am having a problem trying to get a link in the top frame of a two-frame page, to open a page in the bottom frame. But the links keep opening a new page. An example of my problem is at:
http://www.darrellburnett.com/Frame_Test/
And the relevant code from the top frame is below:
<body>
<div align="center"><strong><span class="style2">This is Top_Menu_Frame.html</span> <a href="Page_1.html" target="Bottom">LINK 1</a> <a href="Page_2.html" target="Bottom">LINK 2</a> <a href="Page_3.html" target="Bottom">LINK 3</a> <a href="Page_4.html" target="Bottom">LINK 4</a></strong></div>
</body>
</html>
As you can see, the links are 'targeted' at the bottom frame (named 'Bottom') and all resources I have looked at say that it SHOULD work! I'm using Dreamweaver 8.
I would be grateful for ANY help anyone can offer.
Thank you!
|
|
|
June 25th, 2007, 09:50 PM
|
#2
|
|
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 23
Posts: 1,170
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
There is no need to use frames. There is never any need to use frames. But have you tried the attribute name="Bottom" as well as just the id? I don't know, I don't use frames but it might work.
You really should try to do this without frames though.
Pete. 
|
|
|
June 26th, 2007, 12:16 AM
|
#3
|
|
New Member
Join Date: Jun 2007
Location: Nottingham, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
Hi PA007
After reading quite extensively on the web about people's opinions on frames, I was beginning to come around to the same conclusion!
Thank you again.
|
|
|
June 26th, 2007, 04:33 AM
|
#4
|
|
Reputable Member
Join Date: Jun 2007
Location: Bellevue, SK, Canada
Age: 30
Posts: 222
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
yup.. Use css instead 
|
|
|
June 26th, 2007, 05:04 AM
|
#5
|
|
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 23
Posts: 1,170
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
Here are some great resources for you. They will show the why and how of css layout. Linky link.
Pete. 
|
|
|
December 18th, 2007, 02:32 AM
|
#6
|
|
New Member
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
I got to this thread by doing a search on "frame name target". I would really like to see the question answered - ie, why doesn't it work?
<html>
<head>
</head>
<body>
<frameset>
<frame name="framename">
frame content
</frame>
</frameset>
<p>
<a href=" copy.shtml" target="framename">load new content into frame</a>
</body>
</html>
This results in the content of copy.shtml being displayed in a new page, rather than in the frame called "framename". I have tried firefox, netscape, explorer and opera.
All the documentation that I can find, either in books or online, says that it should work. But it doesn't.
Last edited by karinne; December 18th, 2007 at 12:45 PM..
Reason: Please use vBcode when inserting code in your posts.
|
|
|
December 18th, 2007, 12:44 PM
|
#7
|
|
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 32
Posts: 4,607
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: Why do links in a frame open a new window?
If you want a frame in a page, you should be using the IFRAME element...
Just replace
<frameset>
<frame name="framename">
frame content
</frame>
</frameset>
with something like
<iframe src="foo.html" name="framename" width="400" height="500" scrolling="auto" frameborder="1">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<a href="foo.html">the related document.</a>]
</iframe>
|
|
|
January 25th, 2008, 04:41 AM
|
#8
|
|
WebForumz Member
Join Date: May 2007
Location: northern nsw, au
Age: 28
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
I don't think its really true that frames don't have a place in the world. Personally, I don't use frames but I have started implementing Iframes in a backend application. Sure, to the regular front end "get good SEO compatibility" designer frames may be a marketing nightmare... but to a backend platform creator where you are wanting the website to act more like an application I can't see how CSS can do quite the same trick on its own.
Pete, your suggestion to give iframe the 'name' attribute just fixed my firefox issue. In safari the 'id' was sufficient but with them both its across the board. Thanks!
|
|
|
January 25th, 2008, 05:50 AM
|
#9
|
|
WebForumz Member
Join Date: May 2007
Location: northern nsw, au
Age: 28
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Why do links in a frame open a new window?
p.s. with all this being said, I would actually LOVE to know how to go beyond iFrames... e.g this ajax stuff with loading some fresh content into a DIV on the fly without a full page refresh seems pretty neat to me and probably better than the iframe solution I have going.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|