A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
RabbitMQ in Depth
this week in the
Joined: May 05, 2008
May 26, 2011 00:02:33
Ex: onclick="loadPopup('My Saloon's
')" <----- Text having special character( ' )
If i do this it shows script error "Expected )".
Please let me know how do i handle this.
Joined: May 04, 2011
May 26, 2011 05:52:09
For future reference, there is a
that you should use instead of this one. Special characters need to be escaped. Traditionally the escape character is backslash. Try the following
"loadPopup('My Saloon\'s Test')"
Author and ninkuma
Joined: Jan 10, 2002
May 26, 2011 07:59:46
Moved to the HTML forum.
Asking smart questions
Books by Bear
I agree. Here's the link:
How to check for a particular word in a string.
How to handle Special Characters ?
Problem accessing the form object of a different frame
iterating with a scriptlet, can't get the values into js arr
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015