ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
Dreamweaver Tutorial - Index
Dreamweaver Tutorial - Dreamweaver Interface
Dreamweaver Tutorial - Making Website
Dreamweaver Tutorial - Site Structure and Content
Dreamweaver Tutorial - Style Sheets and Template
Dreamweaver Tutorial - Forms and User Intraction with ASP
Dreamweaver Tutorial - Database
Dreamweaver Tutorial - Dreamweaver Extensions
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Test Search by Job Title
Find a Personal Trainer
Job Resources
Free Self Tests and Quizzes
Find a Lawyer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Six Sigma Green Belt Certification
Lean Management Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Photography Course & Certification
Online Business Writing Course & Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Selling Skills Certification
Business Analysis Course
Green Living Course  free!
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
  All Online Courses
   

   
   
   
   
   
   

   
  Home > Courses, Tutorials & eBooks > Dreamweaver Tutorial > Forms and User Intraction with ASP
 
Dreamweaver Tutorial - Forms and User Intraction with ASP
 
Page 2 of 3
 

Form Validation

Obtaining valid information from a user is a major and critical aspect of any piece of software, especially over the web. Busy Web sites may be adversely affected if their processing resources are occupied by hundreds of incorrect form submissions. The best approach is to take advantage of good form design and what can be called client-side form validation. The browser uses a client scripting language such as JavaScript to check the form data against a set of rules before it sends the form to the server.

Let’s add some checks to the form.

  1. Select the Behaviors panel.
  2. In the tag selector, select the <form#customer_form> tag.
  3. Click on the plus and select Validate Form. The dialog box will appear as shown in Figure-6.18.


    Figure-6.18

  4. Select text "customer_name" in form "customer_form" and click the Required box. You will see the expression (R) appear next to the field name. This mean enter something in this control before submission to the server.
  5. Save your work and test your form in the browser.
  6. Select your interest and type in a comment. Leave the Name and Email fields blank. Then click the submit button. You will find a dialog box with an message i.e The following error(s) occurred: Customer_name is required. This error means complete your missing fields.

Enhance your Form with CSS

With the introduction of CSS and gradual improvement in browser support, the problem of integrating forms controls into visual page design has largely been solved.

With the help of CSS you can transform your form from glaringly out-of-date to crisp and modern in a second.

Applying CSS to Forms

  1. Open Form.htm.
  2. You need to create CSS styles. Earlier in this tutorial we created as External style sheet called Home.css. Append your new styles to that style sheet.
  3. Using the tag selector, select the <body> tag for the page.
  4. Using the style drop-down list in the Property inspector and select Manage Styles.
  5. This brings up the Edit Style Sheet dialog box.
  6. Click Attach and then select style sheet. Click Done to exit the dialog box.
  7. Click the plus in the CSS panel and create a new class as shown in Figure-6.19.


    Figure-6.19

  8. Under the Type Category, Specify the following:
    • Font: verdana, Arial, Helvetica, Sans-serif
    • Weight: bold
    • Color: #333333

    Under the Background category set:
    • Background Color: #FFFF99

    Under the Border category set:
    • Style: Solid
    • Width: 1Px
    • Color: #000000
  9. Specify Same for All for all three.
  10. Click Ok.
  11. In design view, select the form tag and, using the class list in the property inspector, attach the style to the form.

Creating an ASP Page

  1. Choose File --> New to open the New Document dialog box. Under the General tab, Click Dynamic Page in the left Column. In the right column(under Dynamic Page) Click ASP VBscript. Click the create button as sown in Figure-6.20.


    Figure-6.20

  2. Select File --> Save As and save the document as first.asp in local site folder.
  3. When you open the drop-down list in the Insert panel, you will see that there something new there. Dreamweaver makes the ASP panel available as shown in Figure-6.21.


    Figure-6.21

  4. Switch to Code view as shown in Figure-6.22.


    Figure-6.22

  5. Type the text between the title tags.

    <title> ASP page </title>
  6. Click somewhere between the body tags and type the following text.

    <body> ------------(it means beginning of the body tag)
    current Date is Date and Current time is time.
    </body>------------(it means closing of the body tag)
  7. Select the date and click on the output tag on the ASP panel as shown in Figure-6.23.


    Figure-6.23

  8. After clicking this tag , you will find in the design code, dreamweaver has itself inserted code before the Date as shown in Figure-6.24.


    Figure-6.24

  9. Do the same with the Time. You will find insertion of the same code now before the time as shown in Figure-6.25.


    Figure-6.25

  10. Save your file and preview it in the browser.

 

 

 
 
ExpertRating Dreamweaver Certification - Get Certified Now!!
     
 
     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2006. All Rights Reserved.