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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-12-2010, 07:12 AM   #1
Supaflyz
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.
Supaflyz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2010, 07:19 AM   #2
BJ
Confirmed User
 
BJ's Avatar
 
Join Date: Mar 2002
Location: asia
Posts: 5,590
I only have purple or orange
BJ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2010, 07:58 AM   #3
cyber
Confirmed User
 
cyber's Avatar
 
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>
Usage:

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">&nbsp;</span>
    </div>
Check my signature for custom PHP/Javascript/MySQL programming!
cyber is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2010, 08:01 AM   #4
seeandsee
Check SIG!
 
seeandsee's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
js for the win
__________________
BUY MY SIG - 50$/Year

Contact here
seeandsee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2010, 03:46 PM   #5
Supaflyz
Confirmed User
 
Join Date: May 2005
Posts: 151
Thanks very much, i'll try that code out.
Supaflyz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2010, 06:58 PM   #6
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,242
try some jquery action

http://speckyboy.com/2009/12/17/10-u...d-tutorials-2/
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.