...

View Full Version : Form Validation



tcadieux
09-27-2005, 07:19 PM
Hi folkz, i'm looking for a good .js that I can reuse throughout my site. Idealy, i do not want a popup Alert, rather, i'd like to have a "*required field" text that would disappear once the client has typed the appropriate code in the Field. It would also have to have a Form onSubmit in case the user isn't paying attention.

I've seen a few like this, but their examples were so complicated that i had trouble editing them for my own use.

Thanks!

rm-f
09-27-2005, 08:17 PM
I've seen a few like this, but their examples were so complicated that i had trouble editing them for my own use.

Plase post their examples here so we can edit them for you.

tcadieux
09-27-2005, 08:20 PM
This is the one i would try to use
http://www.xs4all.nl/~sbpoley/webmatters/formval.html

My table looks like this.


if Request.form("num") = "" THEN %>


<form action="0_6_8_add.asp" method="post" name="Form" >
<table width="450" border="0" cellspacing="0" cellpadding="3">

</tr>
<TR bgcolor="#CCCCCC">
<TD STYLE="width: 10em">Number of photos to be added:</TD>
<TD><INPUT TYPE=text NAME="num" ID="num" SIZE="10" >
</TD>
</TR>
<tr bgcolor="#CCCCCC">
<td>Series Directory:</td>
<td><input name="Series_Dir" type="text" id="Series_Dir" value="" size="15" >
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="left"><a class="caption">Photo Date</a></div></td>
<td bgcolor="#CCCCCC"><input name="P_DATE<%= x %>" type="text" id="P_DATE<%= x %>" size="22" >
<a href="javascript:show_calendar('document.PE_addtodb.P_DATE<%= x %>', document.PE_addtodb.P_DATE<%= x %>.value);"><img src="../Text_Editor/cal.gif" alt="Choose a date" width="16" height="16"></a></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">Thumbnail:</td>
<td bgcolor="#CCCCCC"><input name="thumbnail" type="File" id="thumbnail" size="25" onChange="DisplayImage('thumbnail',this.value)"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td>&nbsp; </td>
<td><img src="../Images/6_1/Blank_image.jpg" name="thumbnail" width="210" height="70" id="thumbnail"> </td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCCC">Headline:</td>
<td bgcolor="#CCCCCC"><textarea name="Headline" cols="30" rows="3" id="Headline"></textarea></td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCCC">Teaser:</td>
<td bgcolor="#CCCCCC"><textarea name="Teaser" cols="30" rows="3" id="Teaser"></textarea></td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCCC">&nbsp;</td>
<td bgcolor="#CCCCCC"><input type="hidden" name="lang" value="<%=lang%>">
<input type="submit" name="submit" value="Submit Photo Series"></td>
</tr>


</table>
</form>
<%
ELSE
ETC
END IF

glenngv
09-28-2005, 01:14 PM
Try this:

http://www.peterbailey.net/fValidate/

tcadieux
09-28-2005, 02:43 PM
While that looks awesome, a part of the functionailty appears to run from his CSS which he didn't put up for download, and as far as editing the JS files...whoa!

Doesn't anyone have a small, simple demo of how they got this working?

Thans in advance, this app seems to have everyone anyone could need!

glenngv
09-29-2005, 03:00 AM
a part of the functionailty appears to run from his CSS which he didn't put up for download, ...

CSS Setup (http://www.peterbailey.net/fValidate/api/css_setup/)

The script is fully documented here (http://www.peterbailey.net/fValidate/api/).

tcadieux
09-29-2005, 01:50 PM
i can't believe i missed that, thx!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum