Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Form Validation

  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Form Validation

    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!

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    rm -f /

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This is the one i would try to use
    http://www.xs4all.nl/~sbpoley/webmatters/formval.html

    My table looks like this.

    Code:
    	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

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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!

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Quote Originally Posted by tcadieux
    a part of the functionailty appears to run from his CSS which he didn't put up for download, ...
    CSS Setup

    The script is fully documented here.

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i can't believe i missed that, thx!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •