HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
« Previous Thread | Next Thread » Featured Thread Featured Thread  
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 19th, 2008, 07:32 PM
Weekend Coder Weekend Coder is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 117 Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 8 h 23 m 14 sec
Reputation Power: 195
Target Depreciated?

I see that the "target" attribute of the <a> anchor tag is depreciated.

I assume there is now some CSS hook?

How does one define how a particular link is to open (new window, same window, and so on...)?

Reply With Quote
  #2  
Old January 19th, 2008, 08:35 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 9,061 jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 4 Months 3 Days 9 h 48 m 17 sec
Reputation Power: 2015
Send a message via AIM to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Easiest way is to use unobtrusive JavaScript....

http://www.sitepoint.com/article/st...compliant-world
http://www.sitepoint.com/article/xhtml-strict-popups

Please search the forums before asking. This was asked a few days ago and is still on the first page of the HTML forums.... target opening new window.
Comments on this post
Akh agrees!
__________________
Cheers,

Jamie

# mdb4u | mobile movie database | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Reply With Quote
  #3  
Old January 19th, 2008, 08:53 PM
Weekend Coder Weekend Coder is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 117 Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 8 h 23 m 14 sec
Reputation Power: 195
I can't really see JS for something as simple as defining where a link goes, and many people either have JS disabled, or such linkys are blocked by pop-up blockers and so on.

JavaScript to tell the browser to open in a new window? Seems a little much unless you want a special size or no address bar and so on...

Must be a CSS thing.

Reply With Quote
  #4  
Old January 19th, 2008, 09:03 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 9,061 jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 4 Months 3 Days 9 h 48 m 17 sec
Reputation Power: 2015
Send a message via AIM to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Quote:
Seems a little much unless
That is just a matter of opinion I suppose...

The whole point is that if users have JavaScript disabled for whatever reason the link will still open - albeit in the same window.

I could give you many example sites that use this or similar methods.
It is not difficult to implement and it gives non-JavaScript a almost fully functional site.

Reply With Quote
  #5  
Old January 19th, 2008, 11:49 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 23rd Plane (16000 - 16499 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 16,407 Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 1 Day 14 h 19 m 23 sec
Reputation Power: 1780
Here are some other articles:
The Perfect Pop-up
Accessible Pop-up Links
Beware of opening links in a new window
Opening new windows with JavaScript, version 1.2

Quote:
Originally Posted by Weekend Coder
Must be a CSS thing.

Nope. CSS is used to style web pages. Opening links in a new window/tab instead of the current one is a behavior, which is the domain of JavaScript.
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

Check out my blog.

Reply With Quote
  #6  
Old January 20th, 2008, 12:04 AM
Weekend Coder Weekend Coder is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 117 Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level)Weekend Coder User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 8 h 23 m 14 sec
Reputation Power: 195
Quote:
Originally Posted by Kravvitz
Here are some other articles:
The Perfect Pop-up
Accessible Pop-up Links
Beware of opening links in a new window
Opening new windows with JavaScript, version 1.2


Nope. CSS is used to style web pages. Opening links in a new window/tab instead of the current one is a behavior, which is the domain of JavaScript.


I'm NOT interested in "pop-ups". I'm interested in targeting links at new browser tabs.

And, Kravvitz, in the future before closing a thread, maybe you ought to ascertain why a question is being asked and why or why not it might be appropriate for the CSS thread.

That you are now a Moderator is not a license to be rude.

Last edited by Weekend Coder : January 20th, 2008 at 12:06 AM.

Reply With Quote
  #7  
Old January 20th, 2008, 12:19 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 23rd Plane (16000 - 16499 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 16,407 Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 1 Day 14 h 19 m 23 sec
Reputation Power: 1780
Quote:
Originally Posted by Weekend Coder
I'm NOT interested in "pop-ups". I'm interested in targeting links at new browser tabs.

The choice of the term "pop-up" for some of those was unfortunate. I suggest you read them before you complain about them. Pop-ups and links that open in new windows (via JavaScript) can have the same code, except the earlier use window.open's third argument and the latter does not.

Quote:
Originally Posted by Weekend Coder
And, Kravvitz, in the future before closing a thread, maybe you ought to ascertain why a question is being asked and why or why not it might be appropriate for the CSS thread.

That you are now a Moderator is not a license to be rude.

There was no need to have two threads on this topic.

I am curious as to why you thought CSS might have a way to do it. If you would like to explain, please do so in this thread.

I was blunt as usual but wasn't intentionally rude. If you felt I was rude, I apologize.

Reply With Quote
  #8  
Old January 21st, 2008, 11:55 AM
bals28mjk's Avatar
bals28mjk bals28mjk is offline
Person
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2007
Location: Moon
Posts: 929 bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level)bals28mjk User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 20 h 2 m 26 sec
Reputation Power: 255
(I think Kravvitz is just trying to do his job, cross posting is against the rules.)

Quote:
Originally Posted by Weekend Coder
I assume there is now some CSS hook?
Ah, not quite yet Weekend Coder, but CSS3 is cooking something up. If you haven't already, check this out.

I'm against JavaScript controlling this type of behavior too. Though, for some reason I don't think the target attribute will become obsolete any time soon. But, when that time does come, it will already be supplemented by something better. It's a safe bet to continue using it unless of course your working with someone who's a bit stubborn and has to validate in strict.

Also, I think Kravvitz is doing a fantastic job (so far) especially when he has to deal with punks like you Weekend Coder. His cockiness is pretty much the same as its always been.
__________________
Give Opera some love. Use it and you'll see why.

Oh, those monkeys.::What's wrong with the world today?::The lion king in 5 seconds.

My body is so sexy.

Reply With Quote
  #9  
Old January 21st, 2008, 01:26 PM
DorkRawk's Avatar
DorkRawk DorkRawk is offline
I [heart] Toxic Waste
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Here
Posts: 421 DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)DorkRawk User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 30222 Folding Title: Starter FolderFolding Points: 30222 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 1 Day 10 m 55 sec
Reputation Power: 171
MySpace
Hmmm.... I totally understand what W3C is trying to do with the separation of content, style, and functionality, but it just seems like this is replacing a very simple solution to a problem with a (relatively) more complex one. I suppose this is just a prime example of compliance vs practicality.

Again, I understand the logic behind the depreciation for this, but could somebody describe a practical situation where this benefits the developer or the end user?
__________________
"Nobody wins in a butter eating contest."

My band, The American Autumn and on MySpace
Dinosaurs Eat Everybody
Team Hamster Hat
.digits - Every number is the answer to something...

Reply With Quote
  #10  
Old January 23rd, 2008, 03:28 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 9,061 jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 4 Months 3 Days 9 h 48 m 17 sec
Reputation Power: 2015
Send a message via AIM to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
IMHO the practicality of it for developers is that they only need to include a JavaScript file in each page.
If they need to make changes on the functionality of how a window (at least for external sites) opens then only need to amend the JS file,
not all the links associated with link type.

I could use my site as an example. I have 2 window opening JS functions:
1) bookmarking utility (pop-up
2) external sites (new window or tab)

For my pop-up links I have added rel="bookmark"
For my external links, the JS file auto-magically adds rel="nofollow" class="ext"

If I wanted to change my pop-up parameters to a bigger window for example,
I just edit the JavaScript file - not the page with the links in it.

Doing things this way has the same value, to me at least, in putting all your styling in a style sheet and not embedding it within the actual HTML.

Last edited by jabba_29 : January 23rd, 2008 at 03:33 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Target Depreciated?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT