Hi,

I have no trouble to display javascript xml parser separately from php code. However, when I take js parser and integrate it into php parser page, no text are displayed from js parser. The following is my code -

<body>
<div id="contentmargin">
<div id="top">secondary control panel</div>
<h1><img src="images/eclogo.gif"/>&nbsp;<?echo $mName?></h1>
<h2><?echo $tTitle?></h2>

<p>

<script>
if(window.ActiveXObject){
var xmldoc=new ActiveXObject("Microsoft.XMLDOM");
xmldoc.load("01_01_01_01_01_wl.xml");
}
//alert("taes");
displayPage(xmldoc, "01_01_01_01_01_wl.xml");
document.close();
</script>
</p></div></body></html>

displayPage() is the main function which calls other functions to parse XML data and use document.write() to display text.
I found that if I have the alert message box appearing before displayPage function, I get all text I wanted. Does anyone what's wrong with my code?