Javascript: Opening a New Window: Help needed

blade

GEEK 2.0
im trying to have javascript in my header, so i dont have to re-type the attributes on every page i want a pop-up, so far this is what i have, but its not working..

code to put in header..
<SCRIPT LANGUAGE="JavaScript">
function openwindow()
{
window.open('','','width=620,height=800,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
}
</SCRIPT>

code to put on any page..
<a href="javascript:openwindow()" onClick="window.open('http://www.website.com','Shipping Terms')">Shipping Terms</a>
 
There's a tutorial on TechTuts that deals with Javascript pop-ups:

Javascript PopUp Window

Should help a bit.

thanks, but the problem was solved from anothr forum, here is the code..

Code:
<script type="text/javascript">
/*<![CDATA[*/
function win(width,height,url) {
var myfloater=window.open(url,'','scrollbars=yes,toolbar=no,resizable=yes,status=no,width='+width+',height='+height+',top='+((screen.availHeight/2)-(height/2))+',left='+((screen.availWidth/2)-(width/2))+',directories=no');
}
/*]]>*/
</script>



<a href="http://www.domain.com/content.html" onclick="win(600,400,this.href); return false;">launch</a>
 
Back
Top