Skip to content

Instantly share code, notes, and snippets.

View Hodzinek's full-sized avatar

Ing. David Horsák Hodzinek

View GitHub Profile
@Hodzinek
Hodzinek / zipToCityState.js
Created October 10, 2018 13:36 — forked from ritec/zipToCityState.js
Get City and State from Zip Code with Google Geo API
window.findAddressFromZip = function(zipcode) {
var city, state, zip;
zip = zipcode.value;
city = '';
state = '';
if (zip.length === 5) {
$.ajax({
type: 'POST',
url: "http://maps.googleapis.com/maps/api/geocode/json?address=" + zip + "?key=XXXXXXXXXXXXXXXXXXXX",
success: (function(_this) {