title: Need to populate countries list and respective states list in combo box
body: <p>Am looking for a Javascript API which would return all the country details and state details in JSON / JSONP format.</p>
  
  <p>I searched a lot and couldnt get any such API service.</p>
  
  <p>Can you please help me on this ??</p>
  
  <p>I got one URL with which am populating country list. am looking to get state-list for the select countries</p>
  
  <pre><code>function getCountryList(){
             $.ajax({
                 dataType : "jsonp",
                 url : "http://doctor2book.com/service1.svc/getallcountries?callback=?",
                 async : false,
                 success : function(data) {
                     $("#countrySelectBox").html("");
  
                     $.each(data.getcountrybyidResult,function(index, value){                    
                         $("#countrySelectBox").append("&lt;option value='"+value.country_code+"'&gt;"+value.country_name+"&lt;/option&gt;");
                     });
  
                     sortSelectBox($('#countrySelectBox option')) ;
  
                     $("#countrySelectBox").prepend("&lt;option value='' selected&gt;Select a Country&lt;/option&gt;");
  
  
                 },
                 error : function(errorData) {
                     alert("Error while getting Country data :: "+errorData.status);
                 }
             });
      }
  </code></pre>