{"id":21338968,"url":"https://github.com/ajayrandhawa/indian-states-cities-database","last_synced_at":"2025-07-12T14:31:30.574Z","repository":{"id":45715276,"uuid":"141694932","full_name":"ajayrandhawa/Indian-States-Cities-Database","owner":"ajayrandhawa","description":"Cities.js is JavaScript library to create Indian State \u0026 City dropdown lists containing all the States names and Cities names. It is easy customization library. ","archived":false,"fork":false,"pushed_at":"2018-09-14T10:52:28.000Z","size":582,"stargazers_count":61,"open_issues_count":4,"forks_count":73,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-06T13:42:45.110Z","etag":null,"topics":["cities-dropdown","css","dropdown","dropdownlist","dropdownmenu","html","indian-cities","indian-states","javascript-library","list"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajayrandhawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T09:50:50.000Z","updated_at":"2023-01-13T15:37:32.000Z","dependencies_parsed_at":"2022-09-01T20:37:03.868Z","dependency_job_id":null,"html_url":"https://github.com/ajayrandhawa/Indian-States-Cities-Database","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayrandhawa%2FIndian-States-Cities-Database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayrandhawa%2FIndian-States-Cities-Database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayrandhawa%2FIndian-States-Cities-Database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajayrandhawa%2FIndian-States-Cities-Database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajayrandhawa","download_url":"https://codeload.github.com/ajayrandhawa/Indian-States-Cities-Database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825236,"owners_count":17529905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cities-dropdown","css","dropdown","dropdownlist","dropdownmenu","html","indian-cities","indian-states","javascript-library","list"],"created_at":"2024-11-22T00:41:32.138Z","updated_at":"2024-11-22T00:41:32.759Z","avatar_url":"https://github.com/ajayrandhawa.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Indian-States-Cities Dropdown List\n\nCities.js is JavaScript library to create Indian State \u0026 City dropdown lists containing all the States names and Cities names.\n\n\u003cimg src=\"view.gif\" alt=\"view\"\u003e\n\n## Index\n\n```\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cscript src=\"cities.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cselect onchange=\"print_city('state', this.selectedIndex);\" id=\"sts\" name =\"stt\" class=\"form-control\" required\u003e\u003c/select\u003e\n\u003cselect id =\"state\" class=\"form-control\" required\u003e\u003c/select\u003e\n\u003cscript language=\"javascript\"\u003eprint_state(\"sts\");\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n## cities.js\n\n```\nvar state_arr = new Array(\"Andaman \u0026 Nicobar\");\n\nvar s_a = new Array();\ns_a[0]=\"\";\ns_a[1]=\" Alipur | Andaman Island | Anderson Island | Arainj-Laka-Punga | Austinabad | Bamboo Flat | Barren Island \";\n\nfunction print_state(state_id){\n\t// given the id of the \u003cselect\u003e tag as function argument, it inserts \u003coption\u003e tags\n\tvar option_str = document.getElementById(state_id);\n\toption_str.length=0;\n\toption_str.options[0] = new Option('Select State','');\n\toption_str.selectedIndex = 0;\n\tfor (var i=0; i\u003cstate_arr.length; i++) {\n\t\toption_str.options[option_str.length] = new Option(state_arr[i],state_arr[i]);\n\t}\n}\n\nfunction print_city(city_id, city_index){\n\tvar option_str = document.getElementById(city_id);\n\toption_str.length=0;\t// Fixed by Julian Woods\n\toption_str.options[0] = new Option('Select City','');\n\toption_str.selectedIndex = 0;\n\tvar city_arr = s_a[city_index].split(\"|\");\n\tfor (var i=0; i\u003ccity_arr.length; i++) {\n\t\toption_str.options[option_str.length] = new Option(city_arr[i],city_arr[i]);\n\t}\n}\n\n```\n## Version\n\n1.0\n\n## Authors\n\n Ajay Randhawa\n \n ### Happy open Source....\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayrandhawa%2Findian-states-cities-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajayrandhawa%2Findian-states-cities-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayrandhawa%2Findian-states-cities-database/lists"}