New window size.

windows

Guest
Have a link to a new window, how do I make the window from the link opens into a certain size that cannot be changed?<br />
<br />
Thanks.<!--content-->Hi!<br />
<br />
You have to do something like that:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<html><br />
<head><br />
<title>Your title</title><br />
<script type="text/javascript"><br />
function OpenPopup(){<br />
var YourWidth=600;// change to the desired width in pixels<br />
var YourHeight=400;// change to the desired height in pixels<br />
values =<br />
'height='+YourHeight+',width='+YourWidth+',resizable=no';<br />
MyNewWindow=window.open('MyfileToBeOpened','',values);//replace MyfileToBeOpened with path to the file to be displayed<br />
}<br />
</script><br />
</head><br />
<body><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" title="&nbsp;Click here to open blahblah&nbsp;" onClick="javascript:OpenPopup();">Click here</a><br />
</body><br />
</html><br />
<br />
Cheers - Pit<!--content--><a href=http://www.webdeveloper.com/forum/archive/index.php/"foo.html" onclick="window.open(this.href,'', 'height=300,width=300');return false;">Open foo.html.</a><!--content-->
 
Back
Top