Hi Das,

Try the following code it checks exactly the same...


Cheers 
Raju

for (var i = 0; i < inputText.length; i++) {
   if ((inputText.charCodeAt(i) == 13) && (inputText.charCodeAt(i + 1) == 10)) {
        //your logic goes here...
    } 
}
  ----- Original Message ----- 
  From: Partha Ranjan Das 
  To: [EMAIL PROTECTED] 
  Sent: Monday, September 29, 2003 8:51 PM
  Subject: getting new line character in a textarea field


  Hi all,

  I am trying to find whether there is a new line in the text entered in a
  textarea field.
  For testing this I entered a text with a carriage return (enter key) within
  the text assuming that there will be a "\n" chracter at its place. But I did
  not find any such.

  How can I get the new line character from the text entered into the textarea
  field?

  Any help will be highly appreciated.

  Thanking in advance.

  Regards,
  Partha
  *********************************************************************
  Disclaimer: The information in this e-mail and any attachments is
  confidential / privileged. It is intended solely for the addressee or
  addressees. If you are not the addressee indicated in this message, you may
  not copy or deliver this message to anyone. In such case, you should destroy
  this message and kindly notify the sender by reply email. Please advise
  immediately if you or your employer does not consent to Internet email for
  messages of this kind.
  *********************************************************************

  ===========================================================================
  To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
  For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

  Some relevant archives, FAQs and Forums on JSPs can be found at:

   http://java.sun.com/products/jsp
   http://archives.java.sun.com/jsp-interest.html
   http://forums.java.sun.com
   http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to