[jQuery] Stumped on Tables
Jack, how much control do you have over what your server returns for these
table row requests? If you're getting <TR>'s from the server and expecting
to append those to a table, then you have a problem.
element.appendChild('<tr>...</tr>') is an IE specific thing. For any other
browser, you're going to have to parse that HTML one way or another.
Here's a hack you could try if you can't change what ther server gives you.
Something along these lines (using my DOM creation plugin, or you could
write equivalent createElement/appendChild code):
var tbody = $.TBODY({});
var table = $.TABLE({}, tbody );
tbody.innerHTML = htmlFromServerWithTR;
var newRow = tbody.firstChild.cloneNode();
And now you can append newRow to your real table's TBODY.
-Mike
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/