I'm having problems with opening URLs in a new window. I don't know any Javascript and cobbled this together using Dreamweaver 4.

The URL opens in a new window, but the original page then also goes to the new URL. I obviously want the original URL to stay where it is and the new URL to open in the new window.

Any help would be greatly appreciated.

Here's the script.


This is in the head
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>



This is in the body.


echo "\t<td nowrap height=\"30\" colspan=\"3\" class=\"mmedia\"><a href=\"$web_address\" onClick=\"MM_openBrWindow('$web_address','NewspaperLink','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=300')\">$web_address</a></td>\n";