Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-2006, 01:18 PM
skilletsteve skilletsteve is offline
Learning Programmer
 
Join Date: Aug 2006
Posts: 45
Rep Power: 9
skilletsteve is on a distinguished road
Default Question: Opening Link in new Window

What is the code to make a link open in a new window?
thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
  #2 (permalink)  
Old 09-02-2006, 06:19 PM
Void's Avatar   
Void Void is offline
Programming Expert
 
Join Date: Jun 2006
Posts: 411
Rep Power: 12
Void is on a distinguished road
Default

Add target="_blank" to the link like this:

<a href="http://yourlink.com" target="_blank">link</a>
__________________
Void
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old 10-08-2006, 02:16 AM
egon egon is offline
Newbie
 
Join Date: Oct 2006
Location: Iowa
Posts: 13
Rep Power: 0
egon is on a distinguished road
Send a message via AIM to egon
Default

yeah but dont do it to every link, it really bothers visitors. i only use it for certain external links
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4 (permalink)  
Old 04-11-2007, 04:14 PM
sankarj sankarj is offline
Newbie
 
Join Date: Apr 2007
Posts: 25
Rep Power: 7
sankarj is on a distinguished road
Default

Quote:
Originally Posted by Void View Post
Add target="_blank" to the link like this:

<a href="http://yourlink.com" target="_blank">link</a>
You can do that, however I recommend taking a look at this article (link) If you want to be standards compliant, then you have to do something else.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5 (permalink)  
Old 04-12-2007, 02:46 PM
WillB's Avatar   
WillB WillB is offline
Learning Programmer
 
Join Date: Apr 2007
Location: St. Cloud, Fl
Age: 19
Posts: 43
Rep Power: 7
WillB is on a distinguished road
Default

Actually I have come across a few instances where "target="_blank"" didn't work.

To solve that problem:
target="newWindow" has always worked...
__________________
Everything in Life can be solved with an 'If/Else' statement.

Life is like one big try/catch statement, nested within a loop.

-Will

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
  #6 (permalink)  
Old 04-12-2007, 02:51 PM
WillB's Avatar   
WillB WillB is offline
Learning Programmer
 
Join Date: Apr 2007
Location: St. Cloud, Fl
Age: 19
Posts: 43
Rep Power: 7
WillB is on a distinguished road
Thumbs down

Quote:
Originally Posted by sankarj View Post
You can do that, however I recommend taking a look at this article (link) If you want to be standards compliant, then you have to do something else.
i can't stand the fact that JavaScript is being practically forced on Developers.

While I do understand the reasons W3C wants to eliminate some of the things HTML can do, I don't agree with this one...

Someone have a good argument as to why the target attribute should be removed from <a>?
__________________
Everything in Life can be solved with an 'If/Else' statement.

Life is like one big try/catch statement, nested within a loop.

-Will

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7 (permalink)  
Old 04-13-2007, 10:31 AM
DevilsCharm's Avatar   
DevilsCharm DevilsCharm is offline
Programming God
 
Join Date: Jul 2006
Posts: 887
Rep Power: 14
DevilsCharm is on a distinguished road
Default

Are there any other targets besides "_blank" or "newWindow"? I've noticed that just target="blank" works, without the underscore. And why would W3C remove the target command? Why wouldn't it work sometimes?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8 (permalink)  
Old 04-20-2007, 03:51 PM
WillB's Avatar   
WillB WillB is offline
Learning Programmer
 
Join Date: Apr 2007
Location: St. Cloud, Fl
Age: 19
Posts: 43
Rep Power: 7
WillB is on a distinguished road
Default

Quote:
Originally Posted by DevilsCharm View Post
Are there any other targets besides "_blank" or "newWindow"? I've noticed that just target="blank" works, without the underscore.

* _blank - the target URL will open in a new window
* _self - the target URL will open in the same frame as it was clicked
* _parent - the target URL will open in the parent frameset
* _top - the target URL will open in the full body of the window

Quote:
Originally Posted by DevilsCharm View Post
And why would W3C remove the target command? Why wouldn't it work sometimes?
Read this...it will answer your questions, and probably frustrate you.
__________________
Everything in Life can be solved with an 'If/Else' statement.

Life is like one big try/catch statement, nested within a loop.

-Will


Last edited by WillB; 04-20-2007 at 03:56 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9 (permalink)  
Old 06-14-2007, 05:06 PM
shibbythestoner's Avatar   
shibbythestoner shibbythestoner is offline
Programmer
 
Join Date: Jun 2007
Location: Scotland
Age: 17
Posts: 129
Rep Power: 6
shibbythestoner is on a distinguished road
Default

Doesn't this mean people with older versions of dreamweaver, frontpage, etc will suffer?
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New window with custom content - JS domestic JavaScript and CSS 10 06-04-2007 03:08 AM
! Need urgent help ! Drawing program using cygwin siren C and C++ 0 05-26-2007 11:51 PM
Question: Link to parts of a page skilletsteve HTML Programming 3 08-29-2006 04:15 PM
Link exchanges Kaabi Search Engine Optimization 2 08-03-2006 10:34 PM
Link Baiting DevilsCharm Marketing 7 07-23-2006 08:10 PM


All times are GMT -5. The time now is 07:59 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads