Brian Morton <[EMAIL PROTECTED]> writes:
> I have run into a very strange problem I am hoping someone has an
> answer to. I am using appendChildNodes to add a TBODY to an existing
> HTML table on page load.
>
> var newTBODY = TBODY(null, map(row_data_display, row_data));
>
> appendChildNodes($('product_grid'), newTBODY);
>
> The resulting html table looks like this
>
> <table>
> <thead>
> <tr><th>Header</th></tr>
> </thead>
> <tbody>
> <tr><td>Row</td></tr>
> </tbody>
> </table>
>
> Then, I have a signal connected function that adds a row to the tbody
> like so.
>
> var addRow = row_data_display(["", "", "", "", "0", "1", "1", "0",
> "0", "0", ""]);
> var tbody = getFirstElementByTagAndClassName('TBODY', null, $
> ('product_grid'));
> appendChildNodes(tbody, addRow);
>
> When this is done, a new row has been created. In Firefox, the row is
> added below any existing rows, like appendChildNodes should. However,
> in IE7 the new row is added above the existing rows. What gives?
IIRC, this is caused by the default sorting order for each browser.
You'll have to sort the options somehow after appending or you'll have
to sort them all and them swap all options by the new list.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---