The following code works perfectly in Firefix (3.x) and Safari (3.x),
but behaves strangely short of failing in IE (7).
______________________________________________________________________________________________
<html>
  <head>
  <script type="text/javascript" language="JavaScript"
src="prototype.js"></script>
    <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'});
          formNode.insert(tableNode);
          for (var count=0; count<10; count++) {

            var checkBoxNode = new Element('input',
{type:'checkbox',id:'n'+count,value:'true'});
            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
black'}).update(checkBoxNode)));
          }
          $$('body')[0].insert(formNode);
      }
    </script>
  </head>
  <body onload="insertCheckboxInForm();">
  </body>
</html>
______________________________________________________________________________________________

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

Thanks.

Ashwin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to