I want to open "www.urlname.com" in a new window. The code that follows (extraneous stuff excised) works. That is a virtue the value of which is not to be underestimated. Still, a couple of things puzzle me. One is that in the html, the url is specified twice. Also, I do not understand what the "return false" accomplishes. I am hoping someone can take me by the hand and advise whether a better mousetrap stares me in the face.
Best to all,
A.
HTML Code:
<head>
<title>bigtitle</title>
<script language="JavaScript" type="text/javascript" src="js/popwin.js"></script>
</head>
<body>
.
.
.
<a href="http://www.urlname.com" target="_blank" onclick="popwin('http://www.urlname.com'); return false">Big Link</a>
.
.
.
</body>
Code:
function popwin(file) {
window.open(file,'','toolbar=no,left=20,top=20,status=no,width=850,height=500,scrollbars=yes,directories=no,location=no,resizable=yes,menubar=no');
}
Bookmarks