|
| |
|
|
austizzmo
Posts: 4 Joined: 6/19/2003 Status: offline
|
Opening links in a new window. - 6/19/2003 20:59:28
when attempting to validate my html pages with the W3C validator, i learned that the target attribute is not valid. my page makes extensive use of the target attribute and id like to know if there is a way to use css to rid myself of the target attribute. id need to open pages in a new window and in an iframe with the name " mainwin" . thanks in advance.
|
|
|
|
Thomas Brunt
Posts: 6109 Joined: 6/6/1998 From: St. Matthews SC USA Status: offline
|
RE: Opening links in a new window. - 6/24/2003 10:30:12
I believe Gorilla is trying to say that this is an html question as opposed to a css question. I have no idea why someone would say that and then not go on to offer any assistance toward answering your problem. I was unaware that the _target attribute was invalid. Did you checkmark the " verbose" output? t
< Message edited by Thomas Brunt -- 6/24/2003 10:31:21 AM >
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Opening links in a new window. - 6/24/2003 13:45:23
It will depend on which DTD (Document Type Definition) that you are validating against. HTML 4.01 Transitional allows the use of target. I believe it is invalid in HTML 4.01 Strict and XHMTL. Web designers can use the TARGET=NEW attribute on an anchor in Hypertext Markup Language (HTML) to enable users to open a second window in Internet Explorer, but NEW is not a supported attribute for the target tag. If you click a hyperlink that uses the TARGET=NEW attribute, a second Internet Explorer window may open, but if you click subsequent hyperlinks by using the same attribute, a third Internet Explorer window does not open. This behavior occurs because there may be an error in the HTML coding, which is used to set up the Web site. There are five possible ways that the target attribute can be used. The following list details how to use the correct target attribute, according to the World Wide Web Consortium (W3C): TARGET=_BLANK Loads the hyperlink into a new, blank, nameless window TARGET=_PARENT Loads the hyperlink in the parent of the document that contains the hyperlink TARGET=_SELF Loads the hyperlink in the same window in which you click the hyperlink TARGET=_TOP Loads the hyperlink in the full body of the window TARGET={variable} Loads the hyperlink in the {variable} window 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.
< Message edited by pageoneresults -- 6/24/2003 1:47:53 PM >
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
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.
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
austizzmo
Posts: 4 Joined: 6/19/2003 Status: offline
|
RE: Opening links in a new window. - 7/1/2003 17:02:45
thanks alot for your help. i wasnt aware that this would have been better asked in the HTML forum as i was trying to find a way to use CSS to open the links. but since i can' t ill just valitdate may pages with transitional rather than strict. once again, thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|