[thelist] xml in javascript ie does show it
gruppenfreizeit
postmeister at gruppenfreizeit.com
Fri Oct 21 10:17:40 CDT 2005
The prob has been the tbody element, which is not reachable.
cause ie generates automatically a tbody as the tables firstchild,
which makes me trouble, the script doesn't create exactly what I want.
I changed the frame1.php like that to denie the tbody creation:
<table id="z1"
name="z1"style="width:100%;left:0px;position:relative;padding:0,0,0,30;borde
r-width:0px;">
<tbody></tbody>
</table>
and the ctrlframe.php
print 'var tbl=x.getElementById("z1").firstChild;';
but then, the surpringly mozilla does not check there's a tbody element.
So the only way to satisfy both of them is to create a tbody first.
frame1.php:
<table id="z1"
name="z1"style="width:100%;left:0px;position:relative;padding:0,0,0,30;borde
r-width:0px;">
</table>
ctrlframe.php :
print 'var x = window.parent.frame1.document;';
print 'var tbl=x.getElementById("z1");';
print 'var y = x.createElement("TBODY");';
print 'tbl.appendChild(y);';
print 'var y = x.createElement("TR");';
print 'tbl.lastChild.appendChild(y);';
print 'var y = x.createElement("TD");';
print 'tbl.lastChild.lastChild.appendChild(y);';
.
.
.
hope this helps someone and thx for the style attribute hint.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
gruppenfreizeit wrote:
>
'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;");';
Instances like this, you must use .style, e.g.:
tbl.lastChild.lastChild.style = 'color: lightblue:...';
- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFDWImBAQ0d4HGyPE8RAmvcAJ49GVXPptfjeoeFOmzkghDAImtjdACfQZcg
AiyY39MFEGrJyG+OeD4rE8U=
=KRII
-----END PGP SIGNATURE-----
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list