[thelist] xml in javascript ie does show it

gruppenfreizeit postmeister at gruppenfreizeit.com
Sat Oct 22 17:49:56 CDT 2005


IE suffers in inserting functions or stylesheets, in nodes.
An added function, even when it's name is changed , can be called only once.

print 'row.ondblclick= function (){this.style.backgroundColor="red";};';

One click in the whole row collection and all the other rows are done.

When it was easy to create simple hmtl and js pages with IE and Mozzi was
broken cause of each smallest js mistake, now the situation changed to the
contraire. IE 6.x sucks.



-----Ursprüngliche Nachricht-----
Von: thelist-bounces at lists.evolt.org.uk
[mailto:thelist-bounces at lists.evolt.org.uk]Im Auftrag von Robert
Vreeland
Gesendet: Freitag, 21. Oktober 2005 17:29
An: 'thelist at lists.evolt.org'
Betreff: Re: [thelist] xml in javascript ie does show it


When using JavaScript in IE to produce tables and table elements you may
need to use the specific functions for table elements as defined in the W3C
DOM1 specs. It has been my experience that IE suffers major memory leaks
when manipulating tables via the standard DOM, at least in 5+ but I'm not
sure about 6+. To see how MS wants you to do it use the link below.
Additionally, while using createElement does work when adding a few rows or
cells, the memory leaks can crash the browser if adding significant number
of elements to the table.

Hope this helps.
By the way, has anyone experienced this problem in IE 6?

Robert Vreeland
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref
erence/objects/table.asp


-----Original Message-----
From: thelist-bounces at lists.evolt.org.uk
[mailto:thelist-bounces at lists.evolt.org.uk] On Behalf Of gruppenfreizeit
Sent: Thursday, October 20, 2005 11:14 PM
To: thelist at lists.evolt.org.uk
Subject: [thelist] xml in javascript ie does show it

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



--

* * 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 !

--

* * 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