Is this possible using XML and a javascript

Hello all I am trying to write a javascript that will display an Image from an XML page. when I open the page all it displays is the path like this img src="images/ani_pressroom.gif" instead of the actual Image itself

Here is the code:





var RootElement1;

var xm1Doc1=new ActiveXObject ("microsoft.xmldom");

xm1Doc1.load("index.xml");

function StartUp()

{

if(xm1Doc1.readyState=="4")

{

StartLoading();

}

else

{

alert("loading operation could not start");

}

}

function StartLoading()

{

RootElement1=xm1Doc1.documentElement; img1data.innerText=RootElement1.childNodes.item(0).text;

}







!-- image output here --





Can some help me and let me know if this is possible thanks alot




Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion