File: examples/validation_text.html

Recommend this page to a friend!
  Classes of Chara Miteo   JS Form Validator   examples/validation_text.html   Download  
File: examples/validation_text.html
Role: Example script
Content type: text/plain
Description: Examples
Class: JS Form Validator
Validate forms according to many rules
Author: By
Last change:
Date: 10 years ago
Size: 3,565 bytes
 

Contents

Class file image Download
<html> <head> <title>HTML Frames Example - Content</title> <link href="css/style.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../formvalidator/chars/jsafv_messages.js"></script> <script type="text/javascript" src="../formvalidator/chars/diactric_chars_utf8.js"></script> <script type="text/javascript" src="../formvalidator/form.scripts.js"></script> <script type="text/javascript"> var jsFormValidator = new FormValidator(); </script> <script type='text/javascript' src='js/general.js'></script> </head> <body> <h4>Validation of "text" fields</h4> <form name="frmTest" action="result.html" method="get" style="padding:5px;"> <table cellSpacing="0" cellPadding="0" border="0" valign="top"> <tbody> <tr> <td align="left">Text #1<font color="#ff0000">*</font> (rtText):</td> <td width="8">&nbsp;</td> <td align="left"><input size="18" title="Text #1" type="text" maxLength="25" name="rtText" /> <label class='note'>Required field. Type: text</label></td> <td width="8">&nbsp;</td> </tr> <tr> <td align="left">Text #2 (stText):</td> <td width="8">&nbsp;</td> <td align="left"><input size="18" title="Text #2" type="text" maxLength="25" name="stText" /> <label class='note'>Optional field. Type: text</label></td> <td width="8">&nbsp;</td> </tr> <tr> <td align="left">Text #3 <font color="#ff0000">*</font> (stuText):</td> <td width="8">&nbsp;</td> <td align="left"><input size="18" title="Text #3" type="text" maxLength="25" name="rtuText" /> <label class='note'>Required field. Type: text. Sub-type: upper case</label></td> <td width="8">&nbsp;</td> </tr> <tr> <td align="left">Text #4 <font color="#ff0000">*</font> (stlText):</td> <td width="8">&nbsp;</td> <td align="left"><input size="18" title="Text #4" type="text" maxLength="25" name="rtlText" /> <label class='note'>Required field. Type: text. Sub-type: lower case</label></td> <td width="8">&nbsp;</td> </tr> <tr> <td align="left">Text #5 <font color="#ff0000">*</font> (styText):</td> <td width="8">&nbsp;</td> <td align="left"> <select name="rtyText" title="Text #5" style="width:145px"> <option value="">-- select --</option> <option value="first">First Name</option> <option value="last">Last Name</option> <option value="full">Full Name</option> </select> <label class='note'>Required field. Type: text. Sub-type: any</label></td> <td width="8">&nbsp;</td> </tr> <tr><td width="8" colspan="4" nowrap height="23px">&nbsp;</td></tr> <tr> <td align="middle" colSpan="7"> <input type="reset" value="Reset" name="butReset" /> &nbsp; <input onclick="return jsFormValidator.onSubmitCheck(document.forms['frmTest'])" type="submit" value="Submit" name="butRegister"> </td> </tr> </tbody> </table> </form> <hr> <h4>Code</h4> <pre> &lt;INPUT type="text" name="rtText" title="Text #1" maxLength="25" /&gt; &lt;INPUT type="text" name="stText" title="Text #2" maxLength="25" /&gt; &lt;INPUT type="text" name="rtuText" title="Text #3" maxLength="25" /&gt; &lt;INPUT type="text" name="rtlText" title="Text #4" maxLength="25" /&gt; &lt;SELECT name="rtyText" title="Text #5"&gt; &lt;OPTION value=""&gt;-- select --&lt;/OPTION&gt; &lt;OPTION value="first"&gt;First Name&lt;/OPTION&gt; &lt;OPTION value="last"&gt;Last Name&lt;/OPTION&gt; &lt;OPTION value="full"&gt;Full Name&lt;/OPTION&gt; &lt;/SELECT&gt; </pre> </body> </html>