Why do links in a frame open a new window?

This is a discussion on "Why do links in a frame open a new window?" within the Web Page Design section. This forum, and the thread "Why do links in a frame open a new window? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 25th, 2007, 22:06
New Member
Join Date: Jun 2007
Location: Nottingham, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote

  #2 (permalink)  
Old Jun 26th, 2007, 00:50
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #3 (permalink)  
Old Jun 26th, 2007, 03:16
New Member
Join Date: Jun 2007
Location: Nottingham, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #4 (permalink)  
Old Jun 26th, 2007, 07:33
Reputable Member
Join Date: Jun 2007
Location: Bellevue, SK, Canada
Age: 28
Posts: 222
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why do links in a frame open a new window?

yup.. Use css instead
Reply With Quote
  #5 (permalink)  
Old Jun 26th, 2007, 08:04
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #6 (permalink)  
Old Dec 18th, 2007, 05:32
New Member
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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: Select all
<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; Dec 18th, 2007 at 15:45. Reason: Please use vBcode when inserting code in your posts.
Reply With Quote
  #7 (permalink)  
Old Dec 18th, 2007, 15:44
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
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
HTML: Select all
     <frameset>
        <frame name="framename">
            frame content
        </frame>
    </frameset>
with something like
HTML: Select all
<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>
Reply With Quote
  #8 (permalink)  
Old Jan 25th, 2008, 07:41
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #9 (permalink)  
Old Jan 25th, 2008, 08:50
Up'n'Coming Member
Join Date: May 2007
Location: northern nsw, au
Age: 27
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Tags
frame, link, target

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can have iframe links to open in a new window? onSPOT Web Page Design 1 Mar 10th, 2008 07:43
Change open in new window to open in same window nsr500rossi JavaScript Forum 2 Jan 18th, 2008 14:13
[SOLVED] open new window from main window AdRock Other Programming Languages 1 Nov 1st, 2007 02:45
Need JavaScript for html links should open in a new window in the first time, after.. jayaramgussy JavaScript Forum 0 Jun 19th, 2007 09:00
Need to open ALL links in new window javascript JavaScript Forum 4 Aug 4th, 2006 18:46


All times are GMT. The time now is 17:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43