Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Javascript Problem again, Here's another one with the '

views
     
TSrukawa
post Jan 12 2006, 12:54 PM, updated 20y ago

::+::KukuKawa::+::
******
Senior Member
1,903 posts

Joined: Jan 2003
From: Wg Maju


OK, it's not everytime you'll get this problem but hey it's giving me a headache especially names that have the apostrophe ' symbol in them

especially when I am calling a javascript function which pass in variables, it'll interfere with the javascript functions.

Example invokeParent('1','Oscar D' La Hoya');

Yes I know about the escape sequence, the problem is that the name is taken out from the database. Any javascript to handle this?
anthony_yio
post Jan 12 2006, 01:58 PM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(rukawa @ Jan 12 2006, 12:54 PM)
OK, it's not everytime you'll get this problem but hey it's giving me a headache especially names that have the apostrophe ' symbol in them

especially when I am calling a javascript function which pass in variables, it'll interfere with the javascript functions.

Example invokeParent('1','Oscar D' La Hoya');

Yes I know about the escape sequence, the problem is that the name is taken out from the database. Any javascript to handle this?
*
Why not to convert all those unhandled or might interface the HTML rendering or Javascript parsing char to ASCII codes instead?


SincerePrayer
post Jan 12 2006, 02:51 PM

love to pray
Group Icon
Elite
1,120 posts

Joined: Jun 2005
rukawa,


You can try escape it using the function below
CODE
escape(......)


later, use the function below to unescape to the original text
CODE
unescape(.....)



Happy Coding smile.gif
shinchan^^
post Jan 12 2006, 03:53 PM

K66
*********
All Stars
21,256 posts

Joined: Jan 2003
From: Pekopon


u can use either " " or ' '


lmcckl
post Feb 6 2006, 09:57 PM

Getting Started
**
Junior Member
50 posts

Joined: Dec 2005
From: KL


convert to ASCII or HTML, this should be a better pratice if you are going to use XML later smile.gif

 

Change to:
| Lo-Fi Version
0.0130sec    0.81    5 queries    GZIP Disabled
Time is now: 23rd December 2025 - 06:24 AM