Skip to content

Instantly share code, notes, and snippets.

@jagels
Created April 24, 2017 13:51
Show Gist options
  • Save jagels/efc877bf0f320b68f083df4cb62f547d to your computer and use it in GitHub Desktop.
Save jagels/efc877bf0f320b68f083df4cb62f547d to your computer and use it in GitHub Desktop.
Hente postnummer fra Bring API
$("input[name=postnummer]").on("change", function () {
$this = $(this);
$.getJSON("https://fraktguide.bring.no/fraktguide/api/postalCode.json?country=no&pnr=" + $(this).val() + "&callback=?", function (json) {
$(".poststed").text((json.result));
$("input[name=poststed]").val((json.result));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment