title: how to auto complete based on selected country using google api?
body: <p>Its possible to find list of state based on selected country..</p>
  
  <p>Here i have attached some sample code</p>
  
  <pre><code> $("#state").keypress(function(){
              var input = document.getElementById('state');
              //var c1=$("#country").val();
              var c1="us";
             // alert(c1);
              var options = {componentRestrictions: {country: c1}};  
              new google.maps.places.Autocomplete(input, options);
              });
  </code></pre>
  
  <p>if i set country is "us" ,its working but not for other country..</p>
  
  <p>How to find state based on selected country?</p>
  
  <p>Please any one help to me.....</p>