SEO in Manhattan, NYC

How to create a popup message in Dreamweaver

by admin on Jan.03, 2009, under Dreamweaver, HTML

The process of creating a pop-up message in Dreamweaver is very simple. Dreamweaver writes out all the underlying code for you. All you have to do is know how to do it.

First get yourself a copy of Dreamweaver - if you are reading this, I’ll assume you got this covered.

Then, follow me:

Start an HTML page and type in "If I click here a pop-up message will appear" or something like that.

Start an HTML page and type in "If I click here a pop-up message window will open.

Then:

Highlight the words you just wrote down.

Highlight the words you just wrote down.

Then:

On the top of Dreamweaver click on Window,

On the top of Dreamweaver click on "Window", and then click on "Behaviors."

Then:

eee

On the right panel, a Behavior window will appear. Click on the "+" sign to add a behavior.

Then:

4444

Click on "Popup Message"

Then:

dddd

Type in what you want the Popup Message to say. I typed in "Thank you for clicking on me" as an example. The click "OK"

Then:

dddd

In the panel you will see that the "Popup Message" behavior has been added to the text. Now, select when the behavior should be triggered. In my example, I will choose "onClick" which means that the popup message will appear when clicked on.

Then:

sddd

Save the HTML page and open it in your favorite browser. Then click on the text and the pop-up message will appear.

Now you know how to create a popup message the right way using Dreamweaver. This works the same way with images. Just highlight the image and go through the same steps I used on the text. Then whenever anyone clicks on the image a pop-up window will appear.

I want to explain one more thing. Usually the text to click on for a popup message to appear is setup as a link, that way people who hover their mouse arrow over it, can know that something will happen if they click on it. In my browser for example, whenever I scroll over a link my mouse arrow converts into a hand to let me know that something will happen if I click on it. However, what if you only want the popup window to appear but you do not want to create an actual link that will take them away from your page? There’s an easy way to make a browser think something is a link when in fact clicking on the text will not take the visitor away from the page. Heres’s how you do it: Highlight the text again (or image if that is what you are working with) and type in “javascript:void(0)” as the link address.

eeee

Type in javascript:void(0) as the link address.

The reason you should type in javascript:void(0) rather than “#” is because “#” makes the entire page start from the top. So if you want the pop up message to appear when clicking on something at the bottom of a page and not have the page move, then you should use “javascript:void(0)”

That’s it. You are now an expert at creating Popup messages.

For a great example of a pop up message at work, visit this contact form of a page that I helped create. Click on the little padlock under the send button and see what it says.

Thanks for reading!

:, ,
1 comment for this entry:
  1. minirecados.com (2 comments)

    Excellent…

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...