Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajayrandhawa/indian-states-cities-database
Cities.js is JavaScript library to create Indian State & City dropdown lists containing all the States names and Cities names. It is easy customization library.
https://github.com/ajayrandhawa/indian-states-cities-database
cities-dropdown css dropdown dropdownlist dropdownmenu html indian-cities indian-states javascript-library list
Last synced: about 1 month ago
JSON representation
Cities.js is JavaScript library to create Indian State & City dropdown lists containing all the States names and Cities names. It is easy customization library.
- Host: GitHub
- URL: https://github.com/ajayrandhawa/indian-states-cities-database
- Owner: ajayrandhawa
- Created: 2018-07-20T09:50:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T10:52:28.000Z (over 6 years ago)
- Last Synced: 2023-03-06T13:42:45.110Z (almost 2 years ago)
- Topics: cities-dropdown, css, dropdown, dropdownlist, dropdownmenu, html, indian-cities, indian-states, javascript-library, list
- Language: HTML
- Homepage:
- Size: 568 KB
- Stars: 61
- Watchers: 1
- Forks: 73
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Indian-States-Cities Dropdown List
Cities.js is JavaScript library to create Indian State & City dropdown lists containing all the States names and Cities names.
## Index
```
print_state("sts");
```
## cities.js```
var state_arr = new Array("Andaman & Nicobar");var s_a = new Array();
s_a[0]="";
s_a[1]=" Alipur | Andaman Island | Anderson Island | Arainj-Laka-Punga | Austinabad | Bamboo Flat | Barren Island ";function print_state(state_id){
// given the id of the tag as function argument, it inserts tags
var option_str = document.getElementById(state_id);
option_str.length=0;
option_str.options[0] = new Option('Select State','');
option_str.selectedIndex = 0;
for (var i=0; i