RobG wrote:[color=blue]
> Frederik Sørensen wrote:
>[color=green]
>> I have a script that shows an absolute positioned div where a user can
>> select the time in a calendar.
>>
>> The script works perfect in Firefox but in IE6 only my test text node
>> shows up, not any of the tables.
>>
>> The page
http://demo.patch.dk/test.php show a working example click
>> the button to show the div.
>> The script
http://demo.patch.dk/plugin/Js/time.js
>>
>> Any idea what could cause this?
>>
>> /Frederik Sørensen[/color]
>
>
> I didn't wade through all your code, but it seems you may be adding
> your 'tr' elements to the table, not the tbody.
>
> tbody elements are mandatory, but since they are nearly never created
> in the HTML, browsers insert them where appropriate. When adding
> rows to a table element, Geko browsers assume you meant to add them
> to the tbody and so they do that. IE just does nothing.
>
> The solution is to add rows to the tbody, either code a tbody in your
> HTML and give it an id so you can find it explicitly, or go down the
> DOM from your table element to the tbody and go from there.
>
>[/color]
Ah, just found it:
var tableHour = document.createElement('table');
...
var tableHourRow = document.createElement('tr');
...
tableHour.appendChild(tableHourRow);
Create a tbody, append it to the table element then append your rows
to the tbody.
--
Rob