i want to display XML in a iframe ,in the XML BRowser format....

the problm is--->
m not able to diaplay XML in the TEXTAREA on lrft side..to IFRAME in XML BROWSER FORMAT





the code m using is this :

<html>
<script>
function displayad()
{
alert("hmmm");
alert("reached");
document.getElementById("adframe").src="/XMII/CM/MIITrainingSep2011/Shail/newpage1.html";





}
</script>
<body>

<h4> XML DISPLAY </h4>

<table border="0" class="maintable" cellpadding="3px"
cellspacing="3px">
<tr>
<td width="50%" valign="top">
<p class="result_header">XML CODE</p>

<textarea class="code_input" rows="20" cols="50"
id="pre_code" wrap="logical">
</textarea>


<input style="margin-bottom:5px;font-family:verdana;"
name="submit" type="submit" value=" Click Me>>"
onclick="displayad()">



</td>

<td valign="top">
<p class="result_header">XML STRUCTURE</p>

<iframe id="adframe" marginheight="600" marginwidth="100" src=""></iframe>

</td>
</tr>




</table>
</body>
</html>




m using anothr html page,,whic stores the XML frm TEXTAREa....

<html>
<script>
function newtest()
{
document.writeln(window.parent.document.getElementById("pre_code").innerHTML);


}
</script>

<body onload = "newtest()">

</body >
</html>