Creating resizable pop-up windows

Home

Sample links to pop-up windows Enter this code in the Link box to specify file, window location and size and other attributes:
The tiger is a ferocious animal. javascript:OpenPopupWindow('Tiger2.htm','top=10, left=10, scrollbars=yes, resizable=yes, width=200, height=120');
The tiger is a ferocious animal. javascript:OpenPopupWindow('Tiger2.htm','top=100, left=100, scrollbars=no, resizable=no, width=200, height=120');
The tiger is a ferocious animal. javascript:OpenPopupWindow('Tiger2.htm','top=210, left=320, scrollbars=no, resizable=yes, width=400, height=200');

To display content in a pop-up window:

  1. Create all the HTML files that will be displayed in a pop-up window, such as Tiger2.htm above.
     
  2. Copy the file pop-up.js to a folder in your site called scripts/. (From a PC, right-click and save the pop-up.js.)
     
  3. In code view, enter this command after the <title> tag:
     
    <script language="JavaScript" src="scripts/popup.js"></script>
     
  4. From the page that calls the pop-up windows (this page, for example), create the link(s) to the pop-up windows. In the Properties window, enter this code in the Link box:
     
    javascript:OpenPopupWindow('Tiger2.htm','top=100, left=100, scrollbars=no, resizable=no, width=200, height=120');

     
    and edit:

To examine this example further, download this page, the pop-up code, the pop-up page and its images.