[FormValidator]

 
Your Name  
E-mail :
Your comments:

Dieses Script validiert Eingaben in Formulare

[Code]

[zwischen <HEAD> und </HEAD>]

<script >
function validate(){
var err;
err=0;{
if (document.FB.Name.value=="") {
document.FB.name_E.value = '*ERROR:Please enter  your name';err=1;
return false
}else document.FB.name_E.value = '';
if  (document.FB.Email.value.search("@") == -1 || document.FB.Email.value.search("[.*]") == -1){
document.FB.email_E.value = '*ERROR:Please enter a valid e-mail address';err=1;
return false}}
if (err==0) document.write('<center><font color=red size="+2" >Ok!Data sent!</font>');//Please remove this when you fill the "action" field on your FORM

}
</script>

[zwischen <BODY> und </BODY>]
<form name=FB action="" onSubmit="return  validate()">
<table cellspacing="0" cellpadding="4" border="0" width="69%">
<TBODY>
<tr>
<td align="left">
<table cellspacing="0" cellpadding="4" border="0">

<TR>
<TD align=left></TD></TR>
<tr>
<td>
<font face="tahoma,arial" size=2 color=navy>Your Name</font>
</td>
<TD>
<INPUT style="FONT-SIZE: 11px; WIDTH: 200px; COLOR: navy; BACKGROUND-COLOR: orange" size="15" name="Name" onfocus="document.FB.name_E.value = ''">
</TD>
<td>&nbsp; <INPUT
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-SIZE: 11px; BORDER-LEFT: medium none; WIDTH: 200px; COLOR: red; BORDER-BOTTOM: medium none; BACKGROUND-COLOR: white"
size=15 name=name_E>
</td>
</tr>
<tr>
<td>
<font face="tahoma,arial" size=2 color=navy>E-mail :</font>
</td>
<TD>
<INPUT style="FONT-SIZE: 11px; WIDTH: 200px; COLOR: navy; BACKGROUND-COLOR: orange" size="15" name="Email" onfocus="document.FB.email_E.value = ''">
</TD>
<td>
<input name="email_E" size="15" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none;  FONT-SIZE: 11px; BORDER-LEFT: medium none; WIDTH: 300px; COLOR: red; BORDER-BOTTOM: medium none; BACKGROUND-COLOR: white"
>
</td>
</tr>
<tr>
<td colspan="2"><STRONG>
<FONT face=Tahoma
color=#000080 size=2>Your comments:</FONT></STRONG><br><TEXTAREA style="FONT-SIZE: 11px; WIDTH: 350px; COLOR: navy; FONT-FAMILY: tahoma,arial; BACKGROUND-COLOR: white" name=Comments rows=7 wrap=VIRTUAL cols=30></TEXTAREA>
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Send" style="FONT-WEIGHT: bold; BACKGROUND: orange; COLOR: white" >
</td>
<input type="reset" name="reset" value="Reset " style="FONT-WEIGHT: bold; BACKGROUND: orange; COLOR: white">&nbsp;

</tr>
</table>
</form></TD></TR></TBODY></TABLE>

[Autor]

??

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 385