ColdFusion Tutorial

Display an alert box.

Display an alert box.

This will display an alert box if the validation fails. In this example, the field must contain a value.

Some words about the cfinput tag:
Name:        Required. A name for the form input element.
Value:        Optional. An initial value for the form input element.
Size:           Optional. The size of the input control. Ignored if type is Radio or Checkbox.
Maxlength: Optional. The maximum length of text entered, if n type is Text.
Required:   Optional. Enter Yes or No. Default is No.
Message:   Optional. Message text to appear if validation fails.

Click here for more information about the cfinput tag.

If you look at the "View Source" in the browser, you see that Coldfusion have added the necessary JavaScript code.

<!-- cfform post it contains to the same page, test.cfm -->

<cfform action = "test.cfm" method= "post">

<!--- E-mail address: --->

<cfinput name= "mail_address" type= "text" value= "" size= "20" maxlength= "20" required= "yes" message= "E-mail address is required.">

<div align="center">

<input name= "e_mail" type= "submit" value= "Submit">

</div>

</cfform>

ColdFusion Tutorial test

Display an alert box.

No test is available or implemented for this ColdFusion Tutorial.

No User Comments.

No User Comments, be the first one to write your comments?

Add your comments

Your Name*:
Your Email:
Site URL:
Site Name:
Comemt Title*:
Your Comment*:
Key Phrase*:
Df3
Your IP Address: 38.103.63.62
 

ScandicWeb is own by Scandic Systems LTD [UK] Company No. 5984000. All other trademarks and copyrights are the property of their respective holders.

[Home [Site Map [Privacy Statement [Site Feedback] [About ScandicWeb]


[ColdFusion [Flash [Search Engine Optimization [Graphics [Cascading Style Sheets (CSS) [JavaScript (JS) [Software]

Partner sites: ScandicSoft


Server time: 19. November 2008 Wednesday