|
Q141 How can I open a new window by passing the width and height as parameters from a function?
irt.org | Knowledge Base | JavaScript | Window | Q141 [ previous next ]
Q141 How can I open a new window by passing the width and height as parameters from a function?
Try:
<SCRIPT LANGUAGE="JavaScript"><!--
function windowOpen(width,height) {
myWindow = window.open("","windowRef","width=" + width + ",height=" + height+",top=0,left=0,screenX=0,screenY=0");
myWindow.location.href = "apage.html";
if (!myWindow.opener) myWindow.opener = self;
}
function myVoid() {;}
//--></SCRIPT>
<A HREF="javascript:myVoid()" onClick="windowOpen('size.htm',800,600);return false">800x600</A>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.