[thelist] xml in javascript ie does show it

gruppenfreizeit postmeister at gruppenfreizeit.com
Thu Oct 20 22:13:40 CDT 2005


Hello,

At the page
http://www.quirksmode.org/index.html?/dom/innerhtml.html

I've changed my js code and it works in mozilla, but not in ie 6.x.

There should be only a little missing statement to let it work in ie too,
cause the code is running through without errors. It's only not to be seen
on ie.
I want to insert something in another frame.
The code is in a php page and changes the table of another php page.

part of ctrlframe.php:
print '<script type="text/javascript" language="javascript">';
print 'var x = window.parent.frame1.document;';
//print 'alert(1);';
print 'var tbl=x.getElementById("z1");';
print 'var y = x.createElement("TR");';
print 'tbl.appendChild(y);';
//print 'alert(2);';
print 'var y = x.createElement("TD");';
print 'tbl.lastChild.appendChild(y);';
print
'tbl.lastChild.lastChild.setAttribute("style","color:lightblue;font-weight:b
old;width:20%;background-Color:#000066;padding-bottom:5px;padding-left:10px;
padding-top:5px;padding-right:5px;position:relative;");';
print 'var y=x.createElement("IMG");';
print 'tbl.lastChild.lastChild.appendChild(y);';
print
'tbl.lastChild.lastChild.lastChild.setAttribute("src","'.$rf[4].'.gif");';
print
'tbl.lastChild.lastChild.lastChild.setAttribute("style","padding-right:5px;"
);';
//print 'alert(3);';
print '</script>';


The other page looks like that:
frame1.php
<html>
<body bgcolor="white">
<table id="z1" name="z1"
style="width:100%;left:0px;position:absolute;padding:0,0,0,30;border-width:0
px;"></table>';
</body>
</html>

After two hours searching I might say, simple things are not explained
anywhere.
Thank you for some hints.

Tümmel






More information about the thelist mailing list