PDA

Click to See Complete Forum and Search --> : Opening a new window with determined size


lkivik
Sep 13th, 2000, 11:11 AM
How to open a clicked link to a new window whose size is determined, e.g. 500x400? And how to make this window be a non-resizeable...so user can't resize the opened window.

Sep 13th, 2000, 01:54 PM
Try this:

<html>
<SCRIPT LANGUAGE="JavaScript">
function openWin(){
windowNewWin=window.open("",'NewWin','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=0,width=500,heig ht=400');
windowNewWin.document.writeln("<head><title>Hi!</title></head><body bgcolor='black' text=white>");
windowNewWin.document.writeln("<h2><center>Hi World!</h2> ");
windowNewWin.document.writeln("<h4>This is a popup window.</h4> ");
}

</SCRIPT>

<body onLoad="openWin()"></body>
</html>