Author: | IshanDemon |
---|---|
Views Total: | 79,779 views |
Official Page: | Go to website |
Last Update: | February 6, 2015 |
License: | MIT |
Preview:

Description:
A JavaScript library to create country & state dropdown lists containing all the country names and state names.
How to use it:
Load the countries.js JS library in your project.
<script src="countries.js"></script>
Create select list for country & state selection.
<select id="country" name="country"></select> <select name="state" id="state"></select>
this is pretty awesome. I think you should include this snippet on How to use section:
populateCountries(“country”);
Good work buddy
The only naming error i found so far is Romania is incorrectly spelled Romainia
I can seem to get the value of the dropdown on submit. I’m sing php to post the selected country and state to database but value comes empty. Any help please?
You could try http://geodata.solutions – they just give you a bit of code to paste into your site and by the power of ajax it’s all done for you. There’s even lots of configuration options.
I used it for while integrating was working fine. suddenly stopped not getting any response in api call.
not good for production.
But I need City js file also which will include individual state city ,so could u plz help me?
Oh, I think what you mean is to just have the cities from one state in a dropdown. Is that what you want?
This is really awesome ,and it works very well in my website,but i want city js file also .
Are you saying that you’d like a city dropdown for a single country with the cities grouped by state (like you can group countries by continent?). I could look into this for you
This is really awesome.But I want to load a particular country and particular state.So could u please help me.?
u did a great job, thanks a lot
how to show city in this dropdown
This is nice but will it work for cities too?
You forgot US Military addresses: APO, FPO, DPO
Yugoslavia fell apart in 2000. please update the countries list…
Country dropdown working, but State and City values not working.
HI, i have tried to use it, but its not working for me.can you help on this
this code is awesome..!
Thanks a lot!
Yet, It would have been much more helpful if could get an additional list of CITIES..
Thank you !
There is any way to add by class and same class use multiple counties and state select?
how to use this on update page of php? country and state selected as per user’s country and state which is store on database
how to use it?
Thank you so much for this script, you’ve helped me a lot and I’m grateful to you.
Hi i just want to know how to initialize country and state field after selecting them.
How I can set default country and state using this script.