Topic: onClick inside document.write() (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: The Lair |
posted 04-14-2004 04:24
I am trying to figure out why code: document.write('<img src="empty.gif" onClick="src="black.gif"">');
code: document.write("<TD> <img src="+goBoard[i][j].src+" onClick='src="+black.src+"></TD>");
|
Paranoid (IV) Inmate From: France |
posted 04-14-2004 05:24
asptamer: Hi, it seems to be a simple problem of quotes escaping. code: document.write( '<img src="empty.gif" onClick="src=\\'black.gif\\'">' ); and the second code: document.write("<TD> <img src='"+ goBoard[i][j].src +"' onClick='src=\\""+ black.src +"\\"' ></TD>"); I've tested the 2 with success with IE6. |
Paranoid (IV) Inmate From: The Lair |
posted 04-14-2004 10:25
thanks : ) |