Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML and linking to a new window....

Status
Not open for further replies.

CycoDude

Programmer
Oct 6, 2002
3
US
quick question (i hope!)
im playing around with an XHTML strict webpage. i made a link, and want it to open in a new browser window. normally you'ld just add a target="_blank" attribute to the anchor tag to do that. however, the target attribute isnt valid in XHTML stirct.
so my Q would be, how would i go about doing this w/o using the target attribute?
 
I'm really surprised about that.

Here is my suggestion :

<a href=&quot;normalURL.xhtml&quot; onclick=&quot;window.open('normalURL.xhtml'); return false;&quot;>link description</a>

I hope this helps. Gary Haran
 
just to make sure there is no confusion, the target=&quot;_blank&quot; attribute worked just fine, it just didnt validate when i went here:
BUT, your suggestion worked just the same and validated as XHTML 1.0 strict, so thank you very much LOL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top