Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

display an Image from a XML document

I am trying to read an xml element, that contains a name of an gif file. I use this name and set it the src value for the image. Except the image will not display in my HTML table.

The following line of code is in my javascript and is apart of my XML DOM reading function. I have test this code and temp.firstChild.nodeValue does contain the name of my image - one.gif.

document.myform.IMAGE.src = temp.firstChild.nodeValue;

The following is apart of the HTML body.

<form name = "myform">
<table>
<tr>
<td><input type="image" name="IMAGE"></td>
</tr>
</table>
</form>

How can I set the IMAGE file to equal my XML element and display in my table ?

Thanks

Brendon
[803 byte] By [BrendonMelville] at [2007-11-11 7:56:39]