CBT Cafe Logo  

Dreamweaver MX: Closing Pop Up Windows with Text Links

Version: Dreamweaver MX
Level: Basic
Objectives: To add the necessary JavaScript to close your pop up windows
Tools & Techniques: Behaviors, close window, JavaScript, pop up windows

Part 1: Closing a Pop Up Window with a Text Link

Generally, the "Close Window" link is at the bottom of the pop up page but you're welcome to put it anywhere you like.

Type out the text on your page. In this case, I'll use: "Close Window"

Select the text and in the Property inspector, add the following code:

javascript:self.close()

Property Inspector

That should do it. Go ahead and save your page and give it a try.

Part 2: Closing a Pop Up Window with an Image

Closing a window with an image is the same as with text links. Just add the same script to the image as you did the text link to make it work.

Select the image you want to use to close the window and add the following line of code to your Property inspector:

javascript:self.close()

 

transSpacer
 

Home | Dreamweaver | Fireworks | Flash | Photoshop | Elements | PowerPoint| Ebay | QuickTime Pro | Flash 5 CD | Fireworks MX CD | QuickTime Support | Contact

Copyright © 1999-2011 CBT Cafe, All rights reserved

Flash®, Fireworks™, and Dreamweaver® are registered trademarks of Macromedia, Inc. in the United States and/or other countries
Photoshop®, Photoshop Elements® and Illustrator® are registered trademarks of Adobe Systems, Inc.
QuickTime® is a registered trademark of Apple Computer, Inc.
Ebay® is a registered trademark

CBT Cafe | Multimedia Learning | Interactive Graphics