Forum Moderators: mack

Message Too Old, No Replies

Deprecated "target" tag

         

Jose52

5:16 am on Jul 5, 2003 (gmt 0)

10+ Year Member



Since "target" is deprecated in xhtml, I have started using <a href="#" onclick="window.open('newpage.html');"> as replacement for target="_blank". Now I have a frames site I am working on. How do I replace target="_parent", target="_top" etc.

dmorison

6:05 am on Jul 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Jose52,

Search for information on parent.location.href and parent.frames[x].location.href - they should help you.

A polite warning however about your conflicting design choices, and the potential impact on usability of your site. By doing this, you are putting a JavaScript requirement on users of your site and going against the principles of XHTML Strict (target has been depreciated for good reason).

If you're playing with frames I would recommend HTML4.x Transitional at the moment, unless you have a very good reason for choosing XHTML Strict.

Mohamed_E

12:03 pm on Jul 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, Jose52!

For a good discussion of the alternatives to tagret=_blank see tedster's posting in [webmasterworld.com...] (scroll down to msg #8).

killroy

2:42 pm on Jul 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would also recommend a study of the opinion on xhtml on the net. As currently there is hardly any reason to use it, except perhaps MathML, and very little support for text/xml mime in UAs.

I would wager a guess that the only reason you'Re using xhtml is "because it's the kewl techy thing to do" and that might not be good enough of a reason to turn away customers because for js problems. You canT' solve one compatibility problem by introducing dozends others. tehre is a reason for href in xhtml, and it'S not to not use it and use JS instead...

SN

waldemar

6:08 pm on Jul 7, 2003 (gmt 0)

10+ Year Member



Jose, in other words: If you really want to do *X*HTML, then forget about opening new browser windows. Yes, it's possible but it's not the idea behind... Only the user should decide to open new browser windows (aka netscape's/opera/s tabs, IE's right click menu entry); when you make an (x)html page everything you code is happening *inside* the window!

I also made a reference xhtml site and still had the feeling I should open new windows for external site links. Well, the paradigm says "don't", that's what the browser's "Back" button is for". With xhtml I'm following that rule.