Display Image in HTML from XML file

wxdqz

New Member
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;

or

document.myform.IMAGE.src = "one.gif";


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 make document.myform.IMAGE in my form to display the image. I can also store CDATA in my xml if this helps.

Thanks

Brendon
 
Back
Top