Ivo wrote: <40***********************@news.wanadoo.nl>
"Ivo" <no@thank.you> wrote "Jürgen Heyn" <j.****@gmx.de> wrote
<snip> NOT work. obj.write('<p><img src=' + pImage + '
onError="self.src="Images/NoImage.jpg"" border="0"></p>');
Try onError="this.src
^^^^^
That was too quick. You also have a double-quoted string inside a
double-quoted string, which the interpreter won't understand if you
don't escape the innerquotes:
onError="this.src=\"Images/NoImage.jpg\";"
or
onError="this.src='Images/NoImage.jpg';"
Take another step back any you will observe that the double quoted
string inside the double quoted string is itself inside a single quoted
string of HTML. Escaping the quotes within the onerror handler will work
for the javascript interpreter but will not be enough for the HTML
parser if the inner set of quotes remain double.
obj.write('<p><img src="'+pImage +
'" onError="this.src=\'Images/NoImage.jpg\';" border="0"></p>');
Richard.