Hi Anthony,
Another option would be to use an autocompleter. Make the city field a
text input, but as the user starts typing a little list of possible
entries appears below the text input. The user can either mouse click
on one or use arrow keys to select one. The list of possible entries
is pulled dynamically using ajax.
I've used this one from scriptaculous. Works great. All of the
instructions are here:
http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter
Hope this helps.
Brian Humes
Director, Interactive
JohnsonRauhoff
269-428-9257 (direct)
269-428-3377 (main)
269-428-3312 (fax)
www.johnson-rauhoff.com
bhu...@johnson-rauhoff.com
On Nov 10, 2009, at 11:20 AM, Anthony Humphreys wrote:
Hi all,
We had a problem where people were putting in inaccurate information
for the "city."
We solved that problem by using some javascript and limiting the
choice of cities by using a pull-down. The list of cities is
limited by the choice of province.
This introduced a new problem, the page took a very long time to
load as the sript and array of cities was being loaded by the browser.
We solved this by moving the JS script and the JS city array (city
list) into an external JS file which is loaded after the form is
pushed to the browser. Now the form sppears to load very quickly, as
the script/array loads after the browser has already rendered the
form.
However, this introduces a new problem: the form can changed by the
user before all the scripts/arrays have loaded.
I seem to have a few options avaialable to me to solve this, but I
was wondering how you have solved this dilemma.
Option One: Disable the province/city pulldowns until the all the
scripts/arrays load.
Option two: Only populate the province pulldown with the current
province; load the rest of the provinces with the whole province
list only when all the scripts/arrays are loaded
Option three: Save the initial state of the pulldowns; once all of
the script/arrays are loaded compare the intial state against the
current state of the form and make the appropriate updates.
Other options: Other strategies you have used but that I've not
listed.
Thanks!
Anthony -
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf