javascript single quote

P

Ponic

Hello,

I have a for loop and inside that I have if and else condition.
For both conditions I need to append a single quote before and after a
value. I am using '\'' to append single quote.

However in my if condition at the end of the value single quote is
giving problem, only at the end of the value, else where it's working.
I tried space instead of single quote, it's working. What could be the
problem? Any ideawhy I am getting error.

Any help is highly appreciable.

Thanks

Ponic
 
M

Martin Honnen

Ponic said:
I have a for loop and inside that I have if and else condition.
For both conditions I need to append a single quote before and after a
value. I am using '\'' to append single quote.

However in my if condition at the end of the value single quote is
giving problem, only at the end of the value, else where it's working.
I tried space instead of single quote, it's working. What could be the
problem? Any ideawhy I am getting error.

Post the relevant code snippet, and tell us which error message you get
on which line with which browser
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top