Hi all,
I just want to find the SIZE of the textarea and NOT
the LENGTH of that string. Why i need this is .. I
have a database field which is of size 4k. So if i try
to insert more than 4k exception is being raised from
JSP. So i want to restrict it before storing to the
database. And i'm exploring the possiblity of writing
a database trigger if i can? Any suggestions are
welcome. My assumption is length of a string/data and
size of that string are different. I know that you can
restrict the size using maxlength from HTML side
itself. But my purpose is not that.
Any help is appreciable.
Cheers,
Venu
--- Amar_singh <[EMAIL PROTECTED]> wrote:
> you can restrict the size by
> typing
> maxlength = 10
> e.g.
> <input type = text name ="somename" maxlength = 10>
> this will have only ten characters ...
> or else u can take the parameter ..cast it to a
> string ...and find its
> length
>
> Cheers
> ad
>
> -----Original Message-----
> From: Venu Gopal [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 14, 2000 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: TextArea Size
>
>
> Hi,
>
> Could any one can tell me a way where i can find the
> size of the data/characters entered in a textarea of
> an HTML form. Is there any function available in JSP
> to find the size? I have a situation where i need to
> restrict the size. One way i can do this is store
> the
> textarea data in a file and find the filesize. I
> don't
> want to do this. Is there any other alternative?
> Please suggest..
>
> Thanks in advance,
> Cheers,
> Venu
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf! It's FREE.
> http://im.yahoo.com/
>
>
===========================================================================
> 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
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
===========================================================================
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