By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,740 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,740 IT Pros & Developers. It's quick & easy.

Too Many Quote Marks

P: n/a
OC
Help please.... My website doesn't like the following line of code:

document.write('TJ's Restaurant');

Seems to be due to the apostrophe in TJ's. How can I fix it and still keep
the apostrophe? Thanks for your help.
~OC~
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"OC" <oc@sc.rr.nononono.com> wrote in message
news:jS********************@twister.southeast.rr.c om...
Help please.... My website doesn't like the following line of code:

document.write('TJ's Restaurant');

Seems to be due to the apostrophe in TJ's. How can I fix it and still keep
the apostrophe? Thanks for your help.


Precede the apostrophe with a backslash:

document.write('TJ\'s Restaurant');

--
Jim McMaster
mailto: ji**********@comcast.net
Jul 23 '05 #2

P: n/a
OC
"Jim McMaster" <ji**********@comcast.net> wrote in message
news:Sc********************@comcast.com...

"OC" <oc@sc.rr.nononono.com> wrote in message
news:jS********************@twister.southeast.rr.c om...
Help please.... My website doesn't like the following line of code:

document.write('TJ's Restaurant');

Seems to be due to the apostrophe in TJ's. How can I fix it and still keep the apostrophe? Thanks for your help.


Precede the apostrophe with a backslash:

document.write('TJ\'s Restaurant');

--
Jim McMaster
mailto: ji**********@comcast.net


Worked great. Thank you!!
~OC~
Jul 23 '05 #3

P: n/a
You could also just flip between using single or double quotes:

i.e:
document.write("Ken's");
document.write('Ken"s');

This werks 2.

"OC" <oc@sc.rr.nononono.com> wrote in message
news:jS********************@twister.southeast.rr.c om...
Help please.... My website doesn't like the following line of code:

document.write('TJ's Restaurant');

Seems to be due to the apostrophe in TJ's. How can I fix it and still keep
the apostrophe? Thanks for your help.
~OC~

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.