|
|
|
|
|
| | |
| |
vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
|
|
Subject: |
Re: Field validation using ASP/VBScript |
|
From: |
Jordi |
|
Date: |
12/24/2003 5:22:33 AM |
|
IP: |
195.77.33.58 |
The only thing you have to do is to create the messages over each box and set them invisible. When an error ocurrs in a field, where you used to show the alert() message box, you display the invisible message that corresponds to the field that have the error. You can use the tag <label>:
<form name=thisForm>
<LABEL ID="msg01" style="display:none"><font color=red>You must write your name</font></LABEL>
<br>Name:<input type=text name="txt01">
<script language="JavaScript">
function functionsubmit(){
if (thisForm.txt01.value==''){ msg01.style.display='';}
// and continue comparing each field.
}
</script>
<input type=button onclick="functionsubmit();" value="Submit">
</form>
Hope it's usefull |
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|