Adobe 38040334 - Dreamweaver CS3 User Manual page 619

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Attach JavaScript behaviors to HTML form objects
You can attach JavaScript behaviors stored in Dreamweaver to HTML form objects such as buttons.
Note: This feature does not work with ASP.NET form controls because these controls are processed on the server.
Select the HTML form object.
1
2
In the Behaviors panel (Window > Behaviors), click the Plus (+) button, and select a behavior from the list.
Attach custom scripts to HTML form buttons
Some forms use JavaScript or VBScript to perform form processing or some other action on the client as opposed to
sending the form data to the server for processing. You can use Dreamweaver to configure a form button to run a
specific client-side script when the user clicks the button.
Note: This feature does not work with ASP.NET forms.
1
Select a Submit button in a form.
In the Behaviors panel (Window > Behaviors), click the Plus (+) button, and select Call JavaScript from the list.
2
In the Call JavaScript box, enter the name of the JavaScript function to run when the user clicks the button, and
3
click OK.
For example, you can enter the name of a function that doesn't exist yet, such as
If your JavaScript function doesn't exist in the
4
For example, you could define the following JavaScript function in the
message when the user clicks the Submit button:
function processMyForm(){
alert('Thanks for your order!');
}
See also
"Apply the Call JavaScript behavior" on page 350
Create accessible HTML forms
When you insert an HTML form object, you can make the form object accessible, and change the accessibility
attributes later.
Add an accessible form object
The first time you add accessible form objects, activate the Accessibility dialog box for form objects (see
1
"Optimizing the workspace for visual development" on page 538).
This is a one-time-only step.
2
In the document, place the insertion point where you want the form object to appear.
Select Insert > Form, and select a form object to insert.
3
The Input Tag Accessibility Attributes dialog box appears.
4
Complete the dialog box, and click OK. Here is a partial list of options:
section of the document yet, add it now.
head
section of the document to display a
head
September 4, 2007
DREAMWEAVER CS3
.
processMyForm()
612
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents