Results 1 to 2 of 2

Thread: Opening a new window with determined size

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    47

    Lightbulb

    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.

  2. #2
    Guest
    Try this:

    Code:
    <html>
    <SCRIPT LANGUAGE="JavaScript">
    function openWin(){
    windowNewWin=window.open("",'NewWin','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=0,width=500,height=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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width