It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

document.write error

document.write error

Postby nikku on Tue Jan 22, 2008 5:29 am

hello ,

<html>

<head>

<script language="javascript">


function display(){
var xmldoc= new ActiveXObject("Microsoft.XMLDOM");

xmldoc.async="false";
xmldoc.load("x1.xml");

xmlobj=xmldoc.documentElement;






var i,j;

for(i=0;i<xmlobj.childNodes.length;i++)
{
alert("in1");
alert(xmlobj.childNodes(i).getAttribute("name"));
alert("in1111");


for(j=0;j<xmlobj.childNodes(i).childNodes.length;j++)
{
alert("in2");
// document.write(xmlobj.childNodes(i).childNodes(j).getAttribute("name"));
// document.write(xmlobj.childNodes(i).childNodes(j).getAttribute("link"));
}
}

alert("hello");

setTimeout("display()",10000);

}

</script>
</head>


<body>

<script language="javascript">

display();

</script>

</body>

</html>

this is my code,

in the display() function,

if instead of alert i am trying to use document.write, then i am getting an
alert.

Can any one suggest me a solution and the way document.write works.

cheers!!!
nikku
 
Posts: 2
Joined: Fri Jan 11, 2008 12:58 pm

Who is online

Users browsing this forum: No registered users and 8 guests