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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String length

Status
Not open for further replies.

tseh

Programmer
Jan 13, 2000
64
CA
How do I check the string length of text in a input box before submitting the form?
 
use javascripts built in function .length to check the value _______________________________________________
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top