Confused: How to open a new browser window

liunx

Guest
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?<br />
<br />
I was trying to do this...<br />
<br />
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"http://www.website.com" target="_blank">whatever</A><br />
<br />
...and it works. But having the quotation mark after the URL and then doing the target attibute, that doesn't look right. Is it?<!--content--><A HREF=http://www.webdeveloper.com/forum/archive/index.php/"http://www.website.com" target="new">whatever</A><!--content-->Originally posted by CrazyGaz <br />
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"http://www.website.com" target="new">whatever</A> <br />
<br />
Well, first, I guess my syntax was correct, the quote mark after the URL (meaning surrounding the URL) is correct?<br />
<br />
About your target="new" attribute... according to <!-- m --><a class="postlink" href="http://support.microsoft.com/?kbid=272415">http://support.microsoft.com/?kbid=272415</a><!-- m -->, it may not work. It says the target="_blank" is correct.<br />
<br />
I was just confused about the quotation mark location.<!--content-->Yes, your quotes are correct, though in HTML 4.01 Strict, the target attribute has been depreciated...<!--content-->Originally posted by pyro <br />
Yes, your quotes are correct, though in HTML 4.01 Strict, the target attribute has been depreciated... <br />
<br />
So, does that mean there is a newer way?<!--content-->You shouldn't be using popups at all, according to the Web Content Accessibility Guidelines (<!-- m --><a class="postlink" href="http://www.w3.org/TR/WCAG10/#gl-interim-accessibility">http://www.w3.org/TR/WCAG10/#gl-interim-accessibility</a><!-- m -->). If you must, you can use Javascript, like this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.example.com" onclick="window.open(this.href); return false">whatever</a><br />
<br />
Adam<!--content-->Originally posted by AdamGundry <br />
You shouldn't be using popups at all, according to the Web Content Accessibility Guidelines (<!-- m --><a class="postlink" href="http://www.w3.org/TR/WCAG10/#gl-interim-accessibility">http://www.w3.org/TR/WCAG10/#gl-interim-accessibility</a><!-- m -->). If you must, you can use Javascript, like this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.example.com" onclick="window.open(this.href); return false">whatever</a><br />
<br />
Adam <br />
<br />
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...<br />
<br />
"Also, changing the current window or popping up new windows can be very disorienting to users who cannot see that this has happened."<br />
<br />
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.<br />
<br />
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.<br />
<br />
So, the questions now...<br />
<br />
1. Should ANY kind of "new window" EVER be used without getting the surfer's "approval" to do so.<br />
<br />
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%?<!--content-->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?<br />
<br />
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.<!--content-->How does using javascript instead make opening a new window better? What's the difference?<!--content-->For some reason browser makers have made it easier to block that kind of popup.<!--content-->Originally posted by Charles <br />
For some reason browser makers have made it easier to block that kind of popup. <br />
<br />
You mean they have made the HTML way or the javascript way easier to turn off?<br />
<br />
13% have javascript turned off.<br />
<br />
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.<!--content-->
 
Back
Top