Web Authoring
  Home arrow Web Authoring arrow Page 4 - Dreamweaver MX 2004 Extensions
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB AUTHORING

Dreamweaver MX 2004 Extensions
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 42
    2004-07-06

    Table of Contents:
  • Dreamweaver MX 2004 Extensions
  • Managing Extensions with the Macromedia Extension Manager
  • Yaromat Check Form
  • Build a Simple Survey Form
  • Massimocorner CF Upload
  • Dreamweaver’s Server Behavior Builder
  • Build Server Behavior Code and Interface
  • Distributing Server Behavior

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th -1:00PM EST. Register Today!

    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.

    More Web Authoring Articles
    More By Apress Publishing


     

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway