SyNow.org Web Site Design & Web Hosting Tutorials


Articles

Domain Name Registration - Free Web Hosting Email Tips and Tricks -  Home Based Web Business - Work at Home - Chat Rooms  - Voice Chat - Cell Phone - Phone Calls - Love Dating - Online Dating Services


 

Dreamweaver MX Tutorials >>New Tutorials >> Closing Pop Up Windows with Text Links

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()

Domain Hosting | Dedicated Servers| Link Exchange Directory