textfields in HTML can have a character limit imposed like this:

 <input type="text" name="hi" size="10" maxlength="3">

the maxlength attribute will not allow a user to type more than 3
characters.  If you don't want to impose a limit of typed characters but
would rather validate the length of the field value, using javascript is
good for this, but do it in HTML unless you have to perform some other
validation in addition to the character length.



-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Suresh kumar K Badiga
Sent: Tuesday, August 15, 2000 11:17 PM
To: [EMAIL PROTECTED]
Subject: How to limit charecters


Hi all

I am using JSP Pages in that some textfields i want to limit the characters
this how to do

should i use for this JavaScript. if possible give me some example.

Thanks in advance.

-Suresh

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to