Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image not displaying, from javascript

Status
Not open for further replies.
Jun 5, 2006
28
US
I have the following line of code in my javascript.

document.all['test_label'].firstChild.data = '<img src="/images/cabinet.gif" height=15 width=15>Check this out';

When it goes to render the page it displays it as
<img src="/images/cabinet.gif" height=15 width=15>Check this out

Any idea why the image is not showing up? Anyway to modify that line of code so it interprets the image?
 
Code:
document.all['test_label'].firstChild.[s]data[/s][!]innerHTML[/!] = '<img src="/images/cabinet.gif" height=15 width=15>Check this out';

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top