-
Jan 26th, 2005, 06:43 AM
#1
Thread Starter
Hyperactive Member
replacement for target="_blank" in XHTML 1 Strict?
I'm working on a webpage and the client has specifed that they want the page to be XHTML 1.0 Strict compliant. I managed to get everything according to standard except for two links which use target="_blank", does anyone know the appropriate way to do this in xhtml strict?
"There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein
If you are programming in Java use www.NetBeans.org
-
Jan 26th, 2005, 10:51 AM
#2
Re: replacement for target="_blank" in XHTML 1 Strict?
In my personal opinion, there is no appropriate replacement for target="_blank" because target="_blank" is not appropriate in the first place. It's my browser, and my decision alone when to open new windows.
Other than that, you'll have to use JavaScript.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 26th, 2005, 01:41 PM
#3
Thread Starter
Hyperactive Member
Re: replacement for target="_blank" in XHTML 1 Strict?
Hmm, alright. Well I'm working on a site for an artist and as part of their portfolio they want to be able to click on a link and have a website popup that happened to use some of their artwork. Having it open in the same site would not be beneficial since you are litterally pushing customers away from your site. However, I am sensitive to alternative browser user so I want to be as standard compliant as possible. Is there any acceptable way of doing this (does anyone have any suggestions)? I could use Transitional which allows the target="" but I'd rather work something out if indeed possible.
"There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein
If you are programming in Java use www.NetBeans.org
-
Jan 26th, 2005, 02:20 PM
#4
Re: replacement for target="_blank" in XHTML 1 Strict?
If the user wants the site in a new window, they'll hold down Shift/Ctrl when clicking the link. If they have already seen enough of the site, it's unfair and annoying to keep them on it.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 26th, 2005, 04:31 PM
#5
Fanatic Member
Re: replacement for target="_blank" in XHTML 1 Strict?
Personaly when I'm on a site and click on a link I want to be able to use the "Back" feature of my browser to go back to where I were before. But I that link I clicked on opened a new window that wouldn't work and I don't like that.
What you could do is to open the link in the same window, but have a small fram at the top that the user can click to go back to the main page. It would say something like "You are now visiting a site outside of www.artist.com. Click here to go back." But don't forget to put a button somewhere that removes that frame. Google uses something like this in their image search or if you go to a cached page.
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer
-
Jan 27th, 2005, 06:53 AM
#6
Re: replacement for target="_blank" in XHTML 1 Strict?
The reason target was remove from the XHTML specification was becuase it forces the user to open a new window and it also makes it a real annoyance accessibility wise for those who have sight imparements and disabilities.
If you want your image to open in a new window simply use a popup. You can test if the popup was blocked and make other arrangments should this be the case.
-
Jan 27th, 2005, 08:30 AM
#7
Frenzied Member
Re: replacement for target="_blank" in XHTML 1 Strict?
You could use JavaScript to make a "fake-popup". It doesn't actually make a popup, but instead it makes a div visible. You could have this div simulate a window (draggable, closable etc). and have it contain the div.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|