On Tue, 2004-09-28 at 21:35, Malcolm wrote:
> Hi Dave
>
> Thanks for the rapid reply. I obtained the data from e.g.
> http://en.wikipedia.org/wiki/List_of_cities_in_Alaska
> I am not too concerned about the criteria by which the towns made it
> onto the list and hence I am not overly concerned about how complete the
> lists are.
>
> www.flattext.com have a utility where I can generate PERL script (costs
> $60) which inserts a select box for state into a web page and upon
> selection of the state, generates a HTML list of towns which is also
> inserted into the web page. The bit I'm now missing is how to get that
> to generate a select list where the user can then choose the city.
>
As Dave said, this is not particularly difficult stuff - you have a
table of 'states' from which you create your initial drop down and then
a separate city-states table which joins the states to the cities from
which you would select the appropriate cities and build a further
selection.
> Alternatively, it might be easier to allow the user to select the state
> and then type in the town and validate the entry against my data. Do you
> have a script that would do that instead?
>
Er, no we don't have a program that does anything like this stuff.
The only draw back with validating afterwards would be that someone
might want to call their locale something different to what you have in
your database or spell it, capitalize it or punctuate it differently.
The city, town, village or hamlet may not appear in your database at
all.
The approach most people take is to allow the user to put in their
postal code and then use that to look up the address and then populate a
form and let them edit it as they see appropriate (supplying house name
or number) - the only problem with this is that the data can be
expensive to obtain.
I have copied the developers list in case someone has something like
this down the back of the sofa.
/J\
--
This e-mail is sponsored by http://www.integration-house.com/
|