-
The number of lines in an HTML text box.
How can I verify the where the user typed enter (line break) in a
HTML text box within my servlet?
I receive the text data by req.getParameter("field");
But how can calculate the number of lines of text written there?
Thanks in advance
Mohamed
-
Re: The number of lines in an HTML text box.
You receive the text into a String, do you not? So you want to find out how
many "lines" of text are in a String. You can use the indexOf() methods of
String to search for any character; in your case you want to search for the
line-end character, which is coded in Java as "\n".
PC2
Mohamed Abu Zur <mabuzur@medifusion.com> wrote in message
news:39d45697$1@news.devx.com...
>
>
> How can I verify the where the user typed enter (line break) in a
> HTML text box within my servlet?
> I receive the text data by req.getParameter("field");
> But how can calculate the number of lines of text written there?
>
> Thanks in advance
>
> Mohamed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks