Click to See Complete Forum and Search --> : New window size.


Nasimov
11-26-2003, 03:07 AM
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?

Thanks.

Pittimann
11-26-2003, 06:33 AM
Hi!

You have to do something like that:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Your title</title>
<script type="text/javascript">
function OpenPopup(){
var YourWidth=600;// change to the desired width in pixels
var YourHeight=400;// change to the desired height in pixels
values =
'height='+YourHeight+',width='+YourWidth+',resizable=no';
MyNewWindow=window.open('MyfileToBeOpened','',values);//replace MyfileToBeOpened with path to the file to be displayed
}
</script>
</head>
<body>
<a href="#" title="&nbsp;Click here to open blahblah&nbsp;" onClick="javascript:OpenPopup();">Click here</a>
</body>
</html>

Cheers - Pit

fredmv
11-28-2003, 01:43 AM
<a href="foo.html" onclick="window.open(this.href, '', 'height=300,width=300');return false;">Open foo.html.</a>