That did the trick, thanks!

- Ian

On Nov 23, 6:06 pm, Fabio <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> You must create a table with this structure so that IE displays it:
> <table>
>   <tbody>
>     <tr><td> .. </td></tr>
>     ...
>   </tbody>
> </table>
>
> Try this:
>
> Event.observe(window,'load',function(){
>   var table = document.createElement('table');
>   var tbody = document.createElement('tbody');
>   $(table).appendChild(tbody);
>   var row = document.createElement('tr');
>   $(tbody).appendChild(row);
>   var cell = document.createElement('td');
>   $(row).appendChild(cell);
>   $(cell).appendChild($('two'));
>   $('one').appendChild(table);
>
> });
>
> On 22 nov, 09:43, izb <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I have this code example that works in Firefox but not in IE6. The
> > question is why?..
>
> > <html>
> >         <head>
> >         <script src="lib/prototype/prototype.js" type="text/
> > javascript">
> >         </script>
> >         <style>
> >             #one{border:solid1px black}
> >             #two{border:solid1px red}
> >         </style>
> >         </head>
> >         <body>
>
> >     <div id="one">This is one</div>
> >     <div id="two">This is two</div>
>
> >     <script type="text/javascript" language="javascript">
> >     Event.observe(window,'load',function(){
> >         var table = document.createElement('table');
> >         var row = document.createElement('tr');
> >         $(table).appendChild(row);
> >         var cell = document.createElement('td');
> >         $(row).appendChild(cell);
> >         $(cell).appendChild($('two'));
> >         $('one').appendChild(table);
> >     });
> >     </script>
>
> >         </body>
> > </html>
>
> > The code has two divs. When the page loads, it creates a table with a
> > single cell in it and places the table within div 'one'. It then takes
> > div 'two' and puts it in the table cell.
>
> > In Firefox you see one div inside the other. In IE, the table is
> > missing.
>
> > Can anyone enlighten me about what might be going on?
>
> > - Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to