Too Many Quote Marks

Discussion in 'Javascript' started by OC, May 21, 2004.

  1. OC

    OC Guest

    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~
     
    OC, May 21, 2004
    #1
    1. Advertising

  2. OC

    Jim McMaster Guest

    "OC" <> wrote in message
    news:jSnrc.52466$...
    > 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:
     
    Jim McMaster, May 21, 2004
    #2
    1. Advertising

  3. OC

    OC Guest

    "Jim McMaster" <> wrote in message
    news:...
    >
    > "OC" <> wrote in message
    > news:jSnrc.52466$...
    > > 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:
    >


    Worked great. Thank you!!
    ~OC~
     
    OC, May 21, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. peelman

    How many threads is too many?

    peelman, Jan 13, 2005, in forum: Java
    Replies:
    12
    Views:
    864
    Esmond Pitt
    Jan 15, 2005
  2. Rhino
    Replies:
    33
    Views:
    1,344
    Oliver Wong
    Dec 22, 2005
  3. rbt
    Replies:
    1
    Views:
    371
  4. Replies:
    3
    Views:
    108
  5. Dag Sunde
    Replies:
    4
    Views:
    376
Loading...

Share This Page