The following code works perfectly in Firefix (3.x) and Safari (3.x),
but behaves strangely short of failing in IE (7).
  <script type="text/javascript" language="JavaScript"
    <script type="text/javascript" language="JavaScript">
      function insertCheckboxInForm()
          var formNode = new Element('form');
          var tableNode = new Element('table').setStyle({'border':'1px
solid black','border-collapse':'collapse'});
          for (var count=0; count<10; count++) {

            var checkBoxNode = new Element('input',
            tableNode.insert(new Element('tr').insert(new Element
('td').setStyle({'border':'1px solid black'}).update('cell' +
count)).insert(new Element('td').setStyle({'border':'1px solid
  <body onload="insertCheckboxInForm();">

In Firefox and Safari, a 10x2 table with "CellX" in the first column
and a checkbox in the second column is generated. In IE, nothing
renders in the browser, but if I just copy and paste the browser
rendering area and paste into Notepad, the text content of the table
shows up.

Does IE have a different behavior for DOM building, or am I not
following a best/recommended practice for such type of dynamic content
generation using the DOM model?

I would really appreciate being pointed in the right direction!!!



You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to