Jump to content

How to open a document in new window in HTML 4.1 strict?


xbl1

Recommended Posts

HI; :) I'd like to ask you How to open a document in new window in HTML 4.1 strict?I tried to use the target="_black", the validate say that it is not allowed in HTML4.1 strict. Could anyone tell me which attribute i can use? Thanks<a href="Country.html" target="_blank"> the country </a> <br>

Link to comment
Share on other sites

Javascript is the answer. Do a search I have answered this question before. It's a very simple script.

Link to comment
Share on other sites

this is the best approach

<a href="Country.html" onclick="return !window.open(this.href)"> the country </a>

if javascript is disabled or the user has a popup blocker that prevents the link from opening the link will still open in the current window.

Link to comment
Share on other sites

this is the best approach
<a href="Country.html" onclick="return !window.open(this.href)"> the country </a>

if javascript is disabled or the user has a popup blocker that prevents the link from opening the link will still open in the current window.

Thanks a lot, aspnetguy. I am very appreciate for that.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...