Pop-up Windows in Dreamweaver

Pop-up Windows in Dreamweaver

Use the Dreamweaver behaviors panel to create small pop-up windows for ads or news!

This behavior helps to create pop-up ads, small browser windows etc. If you don’t have Dreamweaver we have provided the code that you can cut ‘n’ paste and use in your web page.

‘Open Browser Window’ Behavior

This behavior allows you to open a browser window in any size you specify.

Code for the Function: Cut ‘n’ Paste Code

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>

Code for the Links: Cut ‘n’ Paste Code

<a href="javascript:;" onClick="MM_openBrWindow('/website_templates/business1/preview.htm','template','width=780,height=550')">Click Here </a>

The above code is taken from Macromedia Dreamweaver 4.0

Learn how to Open a New browser Window in Dreamweaver

  1. Open the behaviors panel by clicking on Windows/Behaviors.
  2. Select the text that you would like to link to the new browser window.
  3. Click on the ‘+’ symbol in the behaviors panel.
  4. Click on ‘Open Browser Window
  5. In the ‘Open browser Window’ pop-up-window select the URL and specify the width and the height of the window. You can also choose if you want a status bar or a scroll bar etc.
  6. Click on OK
  7. In the behaviors panel under the Events Column you can choose onClick if you want the browser window to open only when the link is clicked.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.