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:
Then:
Then:
Then:
Then:
Then:

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:

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:

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.
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!






July 5th, 2009 on 7:32 am
Excellent…