![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: May 2005
Posts: 151
|
form input minimum length
Been searching on google for a form validator like the old tgp/mgp sites used to have.
It would tell you how many characters you had typed, and show in red or green when you had inputted enough characters for form to be submitted. If anyone has a link be much appreciated. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Mar 2002
Location: asia
Posts: 5,590
|
I only have purple or orange
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Posts: 182
|
Code:
<script language="javascript" type="text/javascript"> function verifyLength(str, num, checkID){ var str = document.getElementById(str).value; var good = "Your input is long enough"; var bad = "Your input is too short"; if(str.length >= num){ document.getElementById(checkID).innerHTML = good; document.getElementById(checkID).className = "verify" } else{ document.getElementById(checkID).innerHTML = bad; document.getElementById(checkID).className = "verify red" } } </script> Code:
<div> <label>Password. Minimum 6 characters.<br /> <input type="password" name="registerFormPassword" id="registerFormPassword" class="field" value="" tabindex="3" onkeyup="javascript:verifyLength('registerFormPassword', '6', 'verifyLengthregisterFormPassword');" /> </label> <br /> <span id="verifyLengthregisterFormPassword" class="verify"> </span> </div> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: May 2005
Posts: 151
|
Thanks very much, i'll try that code out.
|
![]() |
![]() ![]() ![]() ![]() ![]() |