javascript - How to auto-populate the city and state input fields once user enters the valid United States zip code value into an input field? -


Actually, I had this functional functionality on my website but suddenly the URL from which I received state and city AJAX feedback He is doing, he has stopped working.

Now what is the biggest problem that I am facing now, how can this effect be effective again?

  & lt; Input type = "text" class =  

"form-control" size = "20" id = "store_zipcode" name = "store_zipcode" value = "" & gt; & Lt; Input type = "text" class = "form-control" maxlength = "50" readonly = "readonly" name = "store_city" id = "store_city" value = "" & gt; & Lt; Input type = "text" class = "form-control" readonly = "readonly" name = "store_state" id = "store_state" value = "" size = "20" & gt;

jQuery-AJAX code:

  // Function name Add / Edit form in store when user valid US zip The code enters the value function GetLocation () {var geocoder = new google.maps.Geocoder (); Var store_zipcode = $ ("# store_zipcode"). Val (); Var full_ address = store_zipcode; Geocoder.geocode ({'address': full_address}, function (result, status) {if (position == google.maps.GeocoderStatus.OK) {var Latitude = result [0] .geometry.location.lat (); var Val (latitude);} and {// alerts ("request"). === 5) {$ .ajax ({url: "http://zip.elevenbasetwo.com", cache: incorrect, datatype: "Jason", type: "GET", data: "zip =" + el Val (), success: function (result, success) {$ ("# store_city"). Val (result.city); $ ("# store_state"). Val (result.state));}})}}} // Store Add / Edit Form $ ("#store_zipcode") Call the function to display location details. GetLocation;  

One more thing is that I can not store city and state names in my database. It has to be taken from the source as I did above but the data source should be reliable. The functionality should never collapse.

If you want more information about this issue, the inspection I can ask at the following URL:

It seems that elevenbasetwo.com domain is currently not online. There is no valid DNS entry in the Zip.elevenbasetwo.com subdomain and therefore no result will be generated at this time. This is probably only a temporary thing - try it again in a few hours.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -