PDA

View Full Version : Improving load time of page with triple combo


BenAtODE
08-28-2002, 06:42 PM
Hello,
I am using the javascriptkit.com triple combo script on my page, but instead of hard coding the options, I populating the combo boxes with database calls and looping (it is very important that a change in the database also results in a change in the options in the combo box).

Each combo box selects out of a specific table. When an option is selected from the first combo (from Table A), the second combo lists all of the elements in Table B that have the selected option from Table A as a parent. When one of these options in the second combo is selected, the third combo lists all of the options in Table C with the selected option in Table B as a parent.

It works fabulously, except for one problem. There are about 8 possible options for the first combo, about 550 for the second, and about 8500 for the third one. The code generated by my asp page is about 28000 lines long, and takes about five minutes to load every time the page is accessed. Any ideas on how to lower the load time? I am using three ODBC connections...would just one improve things at all?

beetle
08-28-2002, 06:47 PM
Uh, is there a javascript question here? :D

Sounds like you don't need the javascript-based combo box (ahem, SELECT) solution. Instead, it sounds like your ASP page should re-query the DB on each selection (and reload the page) so that your recordset isn't so big. Don't rely on the client-machine to do all that data sorting...let your server do the hard work.

BenAtODE
08-28-2002, 07:06 PM
Yeah, I figured that reloading the page is what I'm going to have to do. The triple combo is pretty nice (I got the idea from an access form that I created a few months ago which does about the exact same thing). Since my intended audience is like two people, both on the same network as I am, I figured that maybe I could get away with using the triple combo and not have performance take a kick in the teeth. Guess I was wrong? :D