View Full Version : Hide sortable lists.
tivaelydoc
03-21-2008, 05:07 PM
I have this site I am working on and it has a sortable list which has over 2000 entries:
http://tivaelydoc.110mb.com/horror2.html
As you can see, it lags beyond belief. So, what I am trying to do is hide all the entries except for 20, 50, or 100 but still have it retain all the entries.
How would I accomplish this?
Medyman
03-23-2008, 02:38 AM
So you want to have all 2000 on the page, but only show 20?
from a pure CSS standpoint, you could add display:none to any element that you don't want to show.
What I would do is set everything to hidden, and then seletively go in and set 20 to show. Perhaps with css and markup like this:
CSS
td { display:none }
td.show { display:block; }
<td class="show">This Will Show</td>
<td>This Will Not</td>
What I would really do in your situation is use some PHP and database to store all those entries. But I guess that's outside the scope of your question.
tivaelydoc
03-24-2008, 07:25 PM
Is there a tutorial on how to store all the entries with PHP?
Medyman
03-25-2008, 12:04 AM
Is there a tutorial on how to store all the entries with PHP?
sure is...
http://www.php-mysql-tutorial.com/
sandyk3
03-25-2008, 02:46 AM
Hi,
In one of my classes we learned about collapsible lists and we used javascript for the list. You could arrange them like you have them collapsing directors last names a-d or put them in alpha order collapsing by title a-d or somthing like that. But here ya go:
(it's the first lists)
http://www.sandysdesignline.com/webbuilding/build2/week2part1.html
Good Luck. Let me know if this works for you.
Sandy
Medyman
03-25-2008, 04:20 AM
Hi,
In one of my classes we learned about collapsible lists and we used javascript for the list. You could arrange them like you have them collapsing directors last names a-d or put them in alpha order collapsing by title a-d or somthing like that. But here ya go:
(it's the first lists)
http://www.sandysdesignline.com/webbuilding/build2/week2part1.html
Good Luck. Let me know if this works for you.
Sandy
The issue still remains that javascript isn't optimal for the kind of thing that the OP is doing. The performance, quite frankly, is horrible. PHP would be able to handle this way better than javascript will. Manipulation of data structure should generally be relegated by the server unless there is some good reason to handle it client side.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.