quotes problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Smith

    quotes problem

    Help is appriciated.

    I have a line of code that is driving me nuts.

    document.write( "<a href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Something,
    Something, Something')'>")

    I had the
    <a href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Something,
    Something, Something')'>
    in another script as
    <a href="javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Something,
    Something, Something')">
    the difference being the double quotes before javascript and before
    the closing >.

    The error I am getting is a syntax error, code 0. Through trial and
    error I have narrowed it down to this line of code. BIG question is
    how should I quote the line???

    Thank you in advance for your help.
  • gf

    #2
    Re: quotes problem

    Try

    document.write( "<a
    href='javascrip t:window.extern al.AddFavorite( \'http://0mygoodness.com \',\'So
    mething,
    Something, Something\')'>" )


    "John Smith" <johnr.smith@gm ail.com> wrote in message
    news:2d9eaf0d.0 407022029.26e93 066@posting.goo gle.com...[color=blue]
    > Help is appriciated.
    >
    > I have a line of code that is driving me nuts.
    >
    > document.write( "<a[/color]
    href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Somet
    hing,[color=blue]
    > Something, Something')'>")
    >
    > I had the
    > <a[/color]
    href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Somet
    hing,[color=blue]
    > Something, Something')'>
    > in another script as
    > <a[/color]
    href="javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Somet
    hing,[color=blue]
    > Something, Something')">
    > the difference being the double quotes before javascript and before
    > the closing >.
    >
    > The error I am getting is a syntax error, code 0. Through trial and
    > error I have narrowed it down to this line of code. BIG question is
    > how should I quote the line???
    >
    > Thank you in advance for your help.[/color]


    Comment

    • Jim Ley

      #3
      Re: quotes problem

      On 2 Jul 2004 21:29:07 -0700, johnr.smith@gma il.com (John Smith)
      wrote:[color=blue]
      >I have a line of code that is driving me nuts.[/color]

      Did you read the FAQ? getting rid of the javascript: would've solved
      your problem... http://jibbering.com/faq/#FAQ4_24
      [color=blue]
      >document.write ("<a href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Something,
      >Something, Something')'>")[/color]

      Jim
      --
      comp.lang.javas cript FAQ - http://jibbering.com/faq/

      Comment

      • Hywel

        #4
        Re: quotes problem

        In article <40e682f9.50896 5583@news.indiv idual.net>, Jim Ley says...[color=blue]
        > On 2 Jul 2004 21:29:07 -0700, johnr.smith@gma il.com (John Smith)
        > wrote:[color=green]
        > >I have a line of code that is driving me nuts.[/color]
        >
        > Did you read the FAQ? getting rid of the javascript: would've solved
        > your problem... http://jibbering.com/faq/#FAQ4_24
        >[color=green]
        > >document.write ("<a href='javascrip t:window.extern al.AddFavorite( 'http://0mygoodness.com ','Something,
        > >Something, Something')'>")[/color][/color]

        Wbo reads those anymore? It's far easier to get someone else to do the
        groundwork for you.

        --
        Hywel

        Big Brother Petition - Better TV Wanted!

        Comment

        Working...