Page 1 of 1

Need a "Country/State/City" component !

Posted: Sun Nov 04, 2007 9:25 am
by tuthmosis
Greetings !

I am looking for a way to know the city where my visitors are... A set of "Country/State/Town" drop-down boxes that updates each other without refreshing the page.

My site is Joomla CMS based.

Either working with drop-down lists of Country/States/Town or by a system of Zooming Maps...

Thanks !

Posted: Sun Nov 04, 2007 10:39 am
by Kieran Huggins
Use the Google Maps API to locate a free-form string from your users. It's so much easier for programmer and user alike.

Example:

Code: Select all

Where do you live?
[Toronto, Canada]

Posted: Sun Nov 04, 2007 1:37 pm
by tuthmosis
Kieran Huggins wrote:Use the Google Maps API to locate a free-form string from your users. It's so much easier for programmer and user alike.

Example:

Code: Select all

Where do you live?
[Toronto, Canada]
Any exemples of where it is used ?...

Posted: Sun Nov 04, 2007 2:00 pm
by tuthmosis
tuthmosis wrote:
Kieran Huggins wrote:Use the Google Maps API to locate a free-form string from your users. It's so much easier for programmer and user alike.

Example:

Code: Select all

Where do you live?
[Toronto, Canada]
Any exemples of where it is used ?...
Also, note that my visitors must only specify their town... And i must be able to extract the city name so that it is always identical. (e.g. Montreal and not montréal or montreal... Always "Montreal"... so it can't be a freeFormat text entry.)

Thanks for any help !

Posted: Sun Nov 04, 2007 3:24 pm
by feyd
This thread appears to have no relation to phpclasses.org, therefore doesn't belong there. Moved to PHP-Code.

Posted: Sun Nov 04, 2007 9:02 pm
by Kieran Huggins

Re: Need a "Country/State/City" component !

Posted: Sat Nov 17, 2007 10:50 pm
by mlemos
tuthmosis wrote:Greetings !

I am looking for a way to know the city where my visitors are... A set of "Country/State/Town" drop-down boxes that updates each other without refreshing the page.

My site is Joomla CMS based.

Either working with drop-down lists of Country/States/Town or by a system of Zooming Maps...
I don't know about integrating with Joomla, but you may want to check this forms generation class.

It comes with a plug-in to create multiple linked select inputs. It can be used to retrieve options from the server, eventually from a database, without refreshing the page using AJAX request. Here is an example.

There is also a plug-in that displays a map using Google maps and lets the use pick a location on the map. The plug-in captures the coordinates into text or hidden inputs so they can be passed to the server when the form is submitted. Here is an example.