I hope this is not a problem that many people before me can have asked about but...
if I do not use javascript, is there an XHTML-compliant way to make an anchor open another window? As well known, the attribute target="new" ir target="blank" is not accepted anymore by W3C standards!
Here is one way without using target="_blank" of course it requires JS but if JS is disabled the use just gets taken to the page anyways in the same window.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload=externalLinks;
-->
</script>
</head>
<body>
<a href="http://www.codingforums.com" rel="external">Coding Forums</a>
</body>
</html>
Not without a url argument in the window.open method it doesn't.
My mistake, sorry. This is what happens when I write in a hurry. Nevertheless, I seldom use forced window links and I can imagine a method like this would be very tiresome in the long run.
I have something of a related problem. I have a link that I need to open in a new window. However, because of certain program limitations I can't use javascript. All I can do is use something on the order of _blank. Is there any way to control the size of the window that opens with this or any other html command?