WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Table Sort Mozilla bug, McShane, February 15, 2001

Subject: Table Sort Mozilla bug From: McShane Date: February 15, 2001

I found that table sort was returning an error for mozilla (i'm using seamonkey) and I think I have fixed it.

It looks like Gecko doesn't support the tBodies[] collection for table elements or the childNodes collection (even though i thought it was in the W3C DOM) so I had to change the first two lines in the sortTable function from

var tBody = tableNode.tBodies[0];
var trs = tBody.childNodes;


var tBody = tableNode.getElementsByTagName("TBODY").item(0);
var trs = tBody.getElementsByTagName("TR");

Finally, I split the compare function into two separate functions - one for alphabetical comparisons and one for numeric.  It's a fair amount of code though, so I'll wait and see if there's any interest before I post it.

Many thanks to Erik as this is by far the best table sort i have encountered.


Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX