TolMera TolMera - 6 months ago 27
Javascript Question

Dynamically Loaded table - Sort with Javascript - No errors? What's happening?

I've got a table that I'm trying to sort.
The Table is loaded by a javascript and inserted into the document by: (abreviated)


Once the table has been loaded, I want to make the table sortable. But it's not working? I'm not getting any errors on FireBug. and I've tried this with several different table sorting scripts.

I've been researching it a little, and can't find much on dynamically loaded tables. This one comes close "How to sort a dynamically rendered table...?" but I want to know more about why that one is working, and mines not.

My Sample site "" So you can see what I'm doing.


You need an id on your table, not a class, as specified here:

// Note that all the tables that need to be sorted MUST contain ID tag. // So, if they do not exist, you must create one for each table that // needs to be sorted. Also, the table names/ids MUST BE UNIQUE.

Replace class by id in your severside code that generates the html table.