[thelist] dynamically populating <SELECT> when selected

Tom Schmidt ildenizen at insightbb.com
Sat Dec 17 10:51:33 CST 2005


Sometimes more information is better!

I have an object maintained in an application's database.  We allow users of
the system to update these objects when needed.  We have a special html
update page.  This page has multiple inputs, some text, some select.  The
text inputs get initialized from the current object attribute values (this
is retrieved from the server database via a proprietary application API).
The select inputs are also initialized, but these come from a database
object holding all the valid values for this attribute (again, we use a
proprietary application API to query the server database and return these
objects and values to the web page).  The options are loaded from this other
set, with the current SELECTED item defined as the current object's value.
Phew, quite a mouthful there!

As a user of the system, each time the options for all the selects on this
update page are loaded, it takes quite some time.  But, often I will only
need to update a text field, or only one of the many select inputs loaded
when the page loads.  From my perspective, this seems both a waste of the
user's time, and a waste of database queries (not to mention there a slow
server response times that cause page load issues, but that is a different
problem).

Ideally - the system would load the page, but ONLY load the current object's
values from the database in all the text inputs and selects.  Now, only if I
end up needing to update a select input, will the page go and hit the
database to populate options for this select with the valid values that the
user can select for this field.  Sounds to me like something that could be
done, and save time and system resources.

I sure hope I have given enough information here!  This is by no means
something that has to be accomplished.  Just an enhancement to a currently
implemented application's.

I appreciate anyone who has the patience to read this and try to assist.

Tom
----- Original Message ----- 
From: "Ian Anderson" <ian at zstudio.co.uk>
To: <thelist at lists.evolt.org>
Sent: Saturday, December 17, 2005 10:18 AM
Subject: Re: [thelist] dynamically populating <SELECT> when selected


> Tom Schmidt wrote:
>
> > 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.
>
> I don't understand how what you're proposing will make any difference,
> if there isn't the facility to use server side scripting to control the
> options that are generated for the dynamically populated popup.
>
> You're saying then that all the data has to be loaded into the page at
> first load, and then some of the options will populate the select menu.
> And you're saying that building the full popup takes too long
>
> But it's the same data you're loading. You either load it into a
> JavAScript array or into an HTML popup menu. I don't see how you can
> save download or server processing time unless you are hitting the
> server again for a reduced data set after the user's first interaction.
>
> My personal feeling is that you should be using two separate pages,
> rather than trying to get all this happening in a single screen. Which
> would again require server side scripting to filter down the options for
> the second screen.
>
> HTH
>
> Cheers
>
> Ian
>
>
>
> -- 
> _________________________________________________
> zStudio - Web development and accessibility
> http://zStudio.co.uk
>
> Snippetz.net BETA - Online code library
> File, manage and re-use your code snippets online
> http://snippetz.net
>
> -- 
>
> * * 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