Home arrow Web Authoring arrow Page 4 - Dreamweaver MX 2004 Extensions
WEB AUTHORING

Dreamweaver MX 2004 Extensions


Most of the core program of Dreamweaver is built using the same API provided to developers for building extensions, making it easier to find the functionality you need to start developing extensions. Read in this chapter about the advantages of the Macromedia Extension Manager, see the popular Yaromat Check Form extension, and the Massimocorner CF Upload extension, and learn how to use the Dreamweaver Server Behavior Builder to build a CFML form mailer. (ColdFusion Web Development with Macromedia Dreamweaver MX 2004, by Jen and Peter deHaan et al., Apress, 2004, ISBN: 1-59059-237-9.)

Author Info:
By: Apress Publishing
Rating: 4 stars4 stars4 stars4 stars4 stars / 52
July 06, 2004
TABLE OF CONTENTS:
  1. · Dreamweaver MX 2004 Extensions
  2. · Managing Extensions with the Macromedia Extension Manager
  3. · Yaromat Check Form
  4. · Build a Simple Survey Form
  5. · Massimocorner CF Upload
  6. · Dreamweaver’s Server Behavior Builder
  7. · Build Server Behavior Code and Interface
  8. · Distributing Server Behavior

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Dreamweaver MX 2004 Extensions - Build a Simple Survey Form
(Page 4 of 8 )

 

  1. In Dreamweaver, create a new folder called Ch9 inside the cfbook folder. Create a new file called checkform.cfm within this folder.

  2. Open checkform.cfm in Design View and insert a new form into it (click the Form button in the Forms tab of the Insert bar). Name the newly created form surveyForm (enter the name into the Properties panel, as shown in Figure 9-4).


    Figure 9-4. The Dreamweaver Properties panel, showing the details of the new form

  3. Enter the text What is your preferred ColdFusion Book? into the form.
  4. Now click on the Radio Group button in the Forms tab of the Insert bar to open the Radio Group dialog box. Fill it in as shown in Figure 9-5, and click OK.


    Figure 9-5.
    The Dreamweaver Radio Group dialog box  

    A radio button group should now be inserted on the page for you.

  5. Below it, type the text If ‘Other’, please specify:. Below this, insert a blank text field into the form by clicking on the Text Field button in the Forms tab of the Insert panel. Name it otherField.
  6. Lastly, insert a Submit button by clicking on the Button icon in the Forms tab of the Insert panel and save your file. Your survey form is ready, and should look like the one shown in Figure 9-6.


Figure 9-6.
Our finished survey form

Now it’s time to add JavaScript validation to the form by using Jaro’s Check Form behavior. Select the <form> tag (displayed as <form#surveyForm>) from the tag selector on the bottom bar of the document window (as shown in Figure 9-7) to select the entire form.


Figure 9-7.
The tag selector for the current page

From the Behaviors panel, click on the + sign and choose Yaromat -> Check Form. The Check Form dialog box will open, as shown in Figure 9-8.


Figure 9-8.
The Yaromat Check Form dialog box, showing the choices available for our first radio button

Now, with surveyRadio[0] selected, click the radio button labeled “one of them” and enter Please choose a book in the Error Message field.

Next, select surveyRadio[1], click the radio button labeled “This must be filled,” and choose otherField from the pop-up menu (which should be the only field available in the pop-up menu anyway). Enter Please specify a title in the Error Message field and click OK.

Looking at the Behaviors panel, you will notice that the Check Form behavior has been applied to the onSubmit event of your form, which is usually the best place to apply client-side form validation. If you now look in Code View, you will see that JavaScript code has been added to your page to validate form entries.

Test the form in a browser. Now if you try to submit the form without making any choice, the “Please choose a book” error message will be displayed, and if you choose the Others radio button without specifying a title for it on the text field, the “Please specify a title” error message will pop up. Fairly impressive, isn’t it?

This chapter is from ColdFusion Web Development with Macromedia Dreamweaver MX 2004, by Jen and Peter deHaan et al. (Apress, 2004, ISBN: 1-59059-237-9). Check it out at your favorite bookstore today.

Buy this book now.


blog comments powered by Disqus
WEB AUTHORING ARTICLES

- Top WordPress Plugins for Social Media
- How to Install WordPress on WAMPP
- More of the Best Wordpress Plugins for Comme...
- Top Wordpress Plugins to Fight Spam
- More of the top Drupal modules for SEO
- Top Drupal Modules for SEO
- More Top Wordpress Plugins for SEO
- Website Optimization Tips
- Backup and Restore a Drupal Website and Data...
- 5 Best Web Font Services
- Web Font Embedding Services
- Joomla Site Administration
- Create PHP Pages that Use WordPress Templates
- Top Joomla Extensions for Social Networking
- Drupal Modules for Site Navigation

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials