Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] regarding CSS...

Started by NewbJ Nov 18, 2004 at 8:55 AM 2 replies 500+ views
Original Post
NewbJ
NewbJ
I have a quick question regarding links. Is there a way to encode all links to open in a new window in the CSS code, such as something to put in the a:link declaration, rather than putting target="new_window" or "_blank" after each link tag? Thanks!
Zul
Zul
I don't think you can do it with CSS, but you should be able to do it with a little &#106avascript with a redirect.<br/><br/>Here's an <a href="http://www.sitepoint.com/article/standards-compliant-world">article</a> on how to do it.
oh hai
markr
markr
Sounds like an exceptionally un-user friendly thing to do. Opening all links in a new window will rapidly cause the user annoyance with the huge number of windows they have. Consider using named target windows instead.

Obviously you can do a search & replace on all the anchors in the page.

You could also have some (client) script which programatically goes through all the links, setting their targets.

Mark
NewbJ
NewbJ
Quote:
Original post by markr
Sounds like an exceptionally un-user friendly thing to do. Opening all links in a new window will rapidly cause the user annoyance with the huge number of windows they have.

Actually, I'm just trying to open one additional window that will refresh if the user clicks on another one of these types of links.

Thanks for the help!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.