|
You'll need to use Javascript to do that. (Might get a better response posting in the Javascript forum).
Or you could switch to ASP.NET which lets you use validation controls. You just write something like:
<asp:RequiredFieldValidator id="rfvName" runat="server" ControlToValidate="txtName" ErrorMessage="Please enter your name" Display="Dynamic" />
and ASP.NET will write the javascript for you, and also perform server side validation for any clients that don't support javaScript.
There are other validator controls such as RangeValidator, CompareValidator and RegularExpressionValidator and you can also create your own custom validators.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
|