Click to See Complete Forum and Search --> : Table Sort Script--won't work in all tables
galadriel
07-22-2003, 02:56 PM
So I snagged that nifty Data Table sorter that Tom is using, plugged it into one table, and it worked beautifully. Now, I have another table, and it's stalling out on me. It is adding lines to the end of the table and doesn't seem to be sorting at all. I'm getting an error ("Object required") after the script runs.
The only fundamental differences between the two tables is that the one that isn't getting sorted does NOT have a date column, or any other numeric data, and is considerably longer than the one that works.
Any ideas?
Khalid Ali
07-22-2003, 03:02 PM
Debugging:
first comment out the one that works and see if then the second one works.
If it works then there is problem in the code that does not take in to account multiple tables.
And if it still does not work then there is a reference problem make sure that the second table has the same reference id's names as the first onw has..
galadriel
07-22-2003, 03:40 PM
The tables are in separate documents. I have inserted the script into the head of each page, and the appropriate <a href>s on the column headings. I have checked the reference IDs...they match up.
galadriel
07-22-2003, 03:51 PM
Apparently, the problem is being caused by the length of the table. If there are more than 37 rows (not columns) of data, I get the error. Can the script be tweaked to accommodate the long table? This table has over 100 rows of data, arranged in 6 columns.
Khalid Ali
07-22-2003, 04:07 PM
its impossible to say because I have no idea what code you are using...
galadriel
07-22-2003, 04:16 PM
it's the script at this url: http://javascript.internet.com/forms/sort-data-table.html