
Using Forms to Specify the Data to Retrieve
43
<!-- check box -->
<p>
Contractor?
<input type="checkbox" name="Contractor" value="Yes"
checked>Yes
</p>
<!-- reset button -->
<input type="Reset" name="ResetForm" value="Clear Form">
<!-- submit button -->
<input type="Submit" name="SubmitForm" value="Submit">
</form>
</body>
</html>
3
Save the page as formpage.cfm within the myapps directory under your Web root
directory.
4
View the form in a browser.
The form appears in the browser.
Remember that you need an action page in order to submit values; you will create
one later in this chapter.
Reviewing the code
The following table describes the highlighted code and its function:.
Code
Description
<form action="actionpage.cfm"
method="post">
Gather the information from this form
using the Post method, and do something
with it on the page actionpage.cfm.
<input type="Text" name="FirstName"
size="20" maxlength="35">
Create a text box called FirstName where
users can enter their first name. Make it
20 characters wide, but allow input of up
to 35 characters.
<input type="Text" name="LastName"
size="20" maxlength="35">
Create a text box called LastName where
users can enter their first name. Make it
20 characters wide, but allow input of up
to 35 characters.
<input type="Text" name="Salary"
size="10" maxlength="10">
Create a text box called Salary where
users can enter a salary to look for. Make
it 10 characters wide, and allow input of
up to 10 characters.
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...