Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javascript special characters

 
deva siva
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

In my string/var/textarea contains special characters like ' " $ !, but javascript does not support the special character.

I want to allow this characters. because in my text area contains messages just like notice board. it's contains ' " ! and $ symbols.

but when i pass this text to another page or update text, it gives a javascript error like object doesnot support.

can u pls help me. regarding this issue

regards
deva siva
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You most likely need to escape the characters.

Eric
 
deva siva
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thaks for your response,

can u pls give me the details how to use...
And one more doubt, While entering a message by typing it in text area, if we press enter to get text on next line it does not show the text on the next line when refreshed.

can u pls help me..!

devasiva p.amujuri
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deva,
What language you are using for updating or sending to different page? If java then you need to escape character in java while retrieving.
Thanks,
kundan
 
deva siva
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

here iam using jsp and javascript,
1.adding the message on textarea
2.pass this value to jsp page by using javascript function.
3. and capture that value in jsp while diplaying this it's take a single line text

ex: iam adding messge like: this is test message
please ignore it.
but while diplaying the message another page in text area it displays like
this is test messageplease ignore it.

can u please help me, i want multiple lines.

bye
deva
 
deva siva
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u please help me..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic