R
rain_c1
Hi!
I have problems with document.createElement() in IE when using TR tags.
Please look at the following very short example:
------------snip-----------------
<table id="test"></table>
<script type="text/javascript">
var MyTable = document.getElementById("test");
var myTR = document.createElement('tr');
var myTD = document.createElement('td');
var myText = document.createTextNode("this is text");
myTD.appendChild(myText);
myTR.appendChild(myTD);
MyTable.appendChild(myTR);
</script>
------------snip-----------------
this works fine in Firefox, but IE is very strange. It refuses to
display the created elements. Through further tests I realized, that
only the TR tag is the problem. If this is already in the static HTML
code it works in IE, too.
Further very strange: If I use the developer toolbar for IE and use the
DOM Explorer, it shows me, that all my dynamic generated tags are
there, but they are not displayed.
Has anybody an idea?
Thank you very much!
Best regards,
- Rainer
I have problems with document.createElement() in IE when using TR tags.
Please look at the following very short example:
------------snip-----------------
<table id="test"></table>
<script type="text/javascript">
var MyTable = document.getElementById("test");
var myTR = document.createElement('tr');
var myTD = document.createElement('td');
var myText = document.createTextNode("this is text");
myTD.appendChild(myText);
myTR.appendChild(myTD);
MyTable.appendChild(myTR);
</script>
------------snip-----------------
this works fine in Firefox, but IE is very strange. It refuses to
display the created elements. Through further tests I realized, that
only the TR tag is the problem. If this is already in the static HTML
code it works in IE, too.
Further very strange: If I use the developer toolbar for IE and use the
DOM Explorer, it shows me, that all my dynamic generated tags are
there, but they are not displayed.
Has anybody an idea?
Thank you very much!
Best regards,
- Rainer