[thelist] Quotes in a quoted event handler

Gary McPherson lists at ingenyus.net
Mon Dec 29 16:09:44 CST 2003


Tab Alleman wrote:

>I'm about out of ideas here.
>
>I've got a form element with an event handler like this:
>
><select size="1" name="s1" onChange="SetText('12', 'he said, "hi."');">
>
>And because of the quotes inside the onChange, I'm getting an
>unterminated string constant error.
>
>I tried:
><select size="1" name="s1" onChange="SetText('12', 'he said,
>\"hi.\"');">
>...still get the error
>
><select size="1" name="s1" onChange="SetText('12', 'he said,
>""hi.""');">
>...still get the error
>
>Is there a way to make this work?  Preferably while keeping the onChange
>handler delimited?
>
>TIA,
>Tab
>
>  
>
Just taking a stab,

<select size="1" name="s1" onChange="SetText('12', 'he said, &quot;hi.&quot;');">

HTH,

Gary





More information about the thelist mailing list