[thelist] JS or No JS - making a form submit from a graphic button

Simon sentient at mail.com
Mon Sep 11 15:17:24 CDT 2000

At 1:24 PM -0500 9/11/00, dave gray wrote:
> you need to escape your single quotes inside of the document.write
> statement, so
>  > onmouseout="changeImages('subPop9_07', 'slices9/subPop9_07.gif');
> would become:
>  > onmouseout="changeImages(\'subPop9_07\', \'slices9/subPop9_07.gif\');
> HTH,
>  -dave

Thanks, Dave, I was hoping that was what (all) I'd missed.
So I escaped all the single quotes in the document.write
statement as follows . . .

document.write(\'<a href="javascript:document.forms[\'subForm\'].submit()"
onmouseout="changeImages(\'subPop9_07\', \'slices9/subPop9_07.gif\'); return true;"
onmousedown="changeImages(\'subPop9_07\', \'slices9/subPop9_07-down.gif\'); return true;"
onmouseup="changeImages(\'subPop9_07\', \'slices9/subPop9_07.gif\'); return true;">
<img name="subPop9_07" src="slices9/subPop9_07.gif" width="151" height="39" border="0"></a>\')
<input type=image src="slices9/subPop9_07.gif" width=120 height=37 border=0
 alt="click to subscribe" title="enter your email address and click the Subscribe button">

Bad news is the graphic button image and anchor tag still
don't appear when Javascript is turned on. The image in the
INPUT tag still loads fine when JS is off.

Can anyone see what (else) I'm doing wrong here?



Sentient Technologies - mailto:sentient at mail.com

More information about the thelist mailing list