Click to See Complete Forum and Search --> : Confused: How to open a new browser window
Duke Will
08-01-2003, 08:41 AM
Sorry, I've read up on this but I have confused myself. Is there a way to open another URL in a new browser window just using HTML?
I was trying to do this...
<A HREF="http://www.website.com" target="_blank">whatever</A>
...and it works. But having the quotation mark after the URL and then doing the target attibute, that doesn't look right. Is it?
CrazyGaz
08-01-2003, 08:55 AM
<A HREF="http://www.website.com" target="new">whatever</A>
Duke Will
08-01-2003, 09:09 AM
Originally posted by CrazyGaz
<A HREF="http://www.website.com" target="new">whatever</A>
Well, first, I guess my syntax was correct, the quote mark after the URL (meaning surrounding the URL) is correct?
About your target="new" attribute... according to http://support.microsoft.com/?kbid=272415, it may not work. It says the target="_blank" is correct.
I was just confused about the quotation mark location.
Yes, your quotes are correct, though in HTML 4.01 Strict, the target attribute has been depreciated...
Duke Will
08-01-2003, 09:46 AM
Originally posted by pyro
Yes, your quotes are correct, though in HTML 4.01 Strict, the target attribute has been depreciated...
So, does that mean there is a newer way?
AdamGundry
08-01-2003, 10:59 AM
You shouldn't be using popups at all, according to the Web Content Accessibility Guidelines (http://www.w3.org/TR/WCAG10/#gl-interim-accessibility). If you must, you can use Javascript, like this:
<a href="http://www.example.com" onclick="window.open(this.href); return false">whatever</a>
Adam
Duke Will
08-01-2003, 11:25 AM
Originally posted by AdamGundry
You shouldn't be using popups at all, according to the Web Content Accessibility Guidelines (http://www.w3.org/TR/WCAG10/#gl-interim-accessibility). If you must, you can use Javascript, like this:
<a href="http://www.example.com" onclick="window.open(this.href); return false">whatever</a>
Adam
First, I am not disputing you since I don't know much. But that page is May of 1999, four and a half years ago... eons in internet time. So, is it appropo? They said...
"Also, changing the current window or popping up new windows can be very disorienting to users who cannot see that this has happened."
I can't see how popping up a new window to give them SOMETHING THEY ASKED FOR isn't okay. If it is, I stand corrected.
HOWEVER... popups, the bad kind... intrusive popups THAT THEY DON'T ASK FOR... I am confused on this issue... whether to use any kind of popup at all.
So, the questions now...
1. Should ANY kind of "new window" EVER be used without getting the surfer's "approval" to do so.
2. You gave me a javascript popup code... 13% of users cannot use this. Why would javascript be better for this? Wouldn't the other way be close to 100%?
Charles
08-01-2003, 11:53 AM
1) Imagine that you don't have the use of your hands and that you are using a head wand to navigate. It's a simple enough task to go back, but it's a real pain in the neck to switch windows. And what of the blind who use browsers that don't have windows?
2) The very good example given by Adam will, on happily JavaScript free browsers, simply work link a normal link and all will be well.
Duke Will
08-01-2003, 12:12 PM
How does using javascript instead make opening a new window better? What's the difference?
Charles
08-01-2003, 12:28 PM
For some reason browser makers have made it easier to block that kind of popup.
Duke Will
08-01-2003, 12:39 PM
Originally posted by Charles
For some reason browser makers have made it easier to block that kind of popup.
You mean they have made the HTML way or the javascript way easier to turn off?
13% have javascript turned off.
Maybe I'll forget doing a popup window at all. Unless it's a link to an outside site. I can see how that would be dumb NOT to open a new window... you've lost the visitor to the other site.