|
abbeyvet -> RE: Opening links in a new window. (6/25/2003 11:23:00)
|
quote:
Hyperlinks that use the TARGET=_BLANK attribute always open a new Internet Explorer window, while hyperlinks that use the TARGET=NEW attribute open a new Internet Explorer window only once. To expand a little on this. That is because all you have done there is given the new window the name ' new' . You could have equally called it ' mickeymouse' or ' london' or ' john' or anything you like. Once you have named a window, or in fact a browser instance, any link that specifies the same name will open in the named window, if it still exists. If it has been closed it will create it again. This seems really handy, and can be in certain situations, but you need to be careful as there is the potential for confusion. Take this scenario. A user opens the first link whose target is ' new' . A new browser window opens and show the page. Fine. The user now tabs back to the links page. The clicks a second link, also specifying the window ' new' . The link opens in the still existing window ' new' . BUT - and this is the important bit - the window ' new' does not come to the front when the new link opens in it. The user has to know to tab to that window and see the second page now in it. Many won' t realise that and may believe that your link is broken. If you are linking to pages that are your own, you can add this in your body tag: onload=" focus()" which will cause the window to come to the front when a new page is loaded. However more often than not it is external links that are linked to in new windows (a practice that has its pros and cons also, but nevermind that now), and you have no way of adding something like that to them. So really, if you just want an new window, reliably and in a way not fraugt with usability issues then _blank is your best bet. Save the named windows for very particular situations.
|
|
|
|