Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field lenght validation in form

Status
Not open for further replies.

taz97

Programmer
Jun 7, 2001
17
CA
I do this to validate a username lenght and i didn't obtain any result.

function valider()
{
var long = "0";
long = document.inscription.Nomutil.lenght;
document.write(long);
if (document.inscription.Nomutil.lenght < 6)
{
alert(&quot;test&quot;)
}
else
{
alert(&quot;ok&quot;)
}
}

Could you help me?
 
sure, n/p. you spelled length wrong. the reason I picked it out so quick is because I had that same problem for like 2 years. I couldn't figure out why my code would never work but if I copied the exact same code from someone else, it worked fine. oh well. LOL

try this:

document.inscription.Nomutil.length;
Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
Icq: 124408594
online.dll

AIM & MSN: robacarp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top