Limit the textbox field size
hi, does anyone know how to solve this problem?
I have this ASP code
<FORM METHOD=POST NAME="accessreq" action="accessresp.asp" >
"<TD align=left bgcolor=#009999>"& " "& "<INPUT TYPE=TEXT
NAME=accessright"& firstserial &" SIZE=50 >"& "</TD>" &_
How do i write a code to prompt the user that he/she has reached the maximum length of the text(for example 254) before submitting the form?
note firstserial is a variable of accumulating number
You can add an attribute to the Input textbox called maxlength. this way the user will not be able to type more than 254 characters.
<INPUT TYPE=TEXT NAME=accessright"& firstserial &" SIZE=50 MAXLENGTH='254'>
sorry,message reposted. admin plz delete.
Last edited by aspcoder; 12-03-2004 at 02:14 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)