[thelist] dynamically populating <SELECT> when selected

Tom Schmidt ildenizen at insightbb.com
Sat Dec 17 09:11:32 CST 2005


Chris,

Thank you for you advice, I do appreciate your answer since it comes from
experience.

I agree this is a fairly sub-optimal solution.  My limitation is that my
solution (should I choose one), must be 100% client side based, and in this
case, that means standard HTML, javascript, and the application specific
tags (APIs) that interface with the application and the database.

Currently, the page takes 10-15 seconds to load, a real frustration for
users, especially since 95% of them will never create/modify any of the
select option data that is causing the page to load so slowly.  However, we
could get the page to come up almost instantly if the option data in the 4-5
select inputs for this page, which we currently populate on load, were
instead populated interactively.  I would then expect 2-5 seconds delay
after the user selects any one of the select inputs.

I guess my desired solution would be to have the user load a page, mouse
over to the select they wish to populate/modify, and then get a hourglass
mouse cursor until the data had been retrieved from the
application/database.  At which point, ideally, the list would be expanded
and displayed in the usualy scollable window.

So far, my code "snippet" is pretty crude, and while it does show that the
information can be loaded interactively, it has a couple quirks that would
make it fairly cumbersome.  It "feels" like the first time I click on my
selection, it just hightlights and expands the one item in the select list,
even if in the background it has now added new options.  The second click
likely "un-expands" the options and shows only the SELECTED option (standard
select behavior).  Only at the third click do I get my added set of options
to expand and be displayed to the user.

I am sure there is something I can do so that the added options are
immediately displayed.  Any ideas?

Again, thank you.


----- Original Message ----- 
From: "Christian Heilmann" <codepo8 at gmail.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, December 15, 2005 4:57 PM
Subject: Re: [thelist] dynamically populating <SELECT> when selected


> > I have been trying to accomplish a small feat with the standard SELECT
input.
> > My problem is that our application loads very large set of data for each
select input.
> > All of this data is loaded from a database query, and all of these
queries happen each
> > time the page is loaded.
> > Since users of this application only occasionally select some of these
inputs, my idea
> > is to only populate the options for the select list when the select box
or select arrow
> > is clicked.  An onClick type javascript function would then load the
option elements
> > interactively.
>
> Please do not populate the dropdown when users select it. We do this
> on our timesheet system and there is nothing more annoying, especially
> as it resets some other values you entered while waiting for the
> loading. Furthermore, it doesn't work with a keyboard, and that is how
> most people do use forms.
>
> Why not add a "show options" link and replace it with the dropdown
> once it is clicked. You can use an AJAX layer to populate the dropdown
> on the server and replace the link on the return.
>
> This is dead easy to achieve via XAJAX: http://xajax.sourceforge.net/
>
> --
> Chris Heilmann
> Blog: http://www.wait-till-i.com
> Writing: http://icant.co.uk/
> Binaries: http://www.onlinetools.org/
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>





More information about the thelist mailing list