Hi!
I have problems with document.create Element() 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.getEle mentById("test" );
var myTR = document.create Element('tr');
var myTD = document.create Element('td');
var myText = document.create TextNode("this is text");
myTD.appendChil d(myText);
myTR.appendChil d(myTD);
MyTable.appendC hild(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.create Element() 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.getEle mentById("test" );
var myTR = document.create Element('tr');
var myTD = document.create Element('td');
var myText = document.create TextNode("this is text");
myTD.appendChil d(myText);
myTR.appendChil d(myTD);
MyTable.appendC hild(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
Comment