1function findAddress(str) 2{ 3 document.getElementById("reg_buildings").options.length = 0; 4 country = ""; 5 if (document.getElementById("reg_country").value === "United Kingdom") { 6 country = "GBR"; 7 } else if (document.getElementById("reg_country").value === "Sweden") { 8 country = "SWE"; 9 } else if (document.getElementById("reg_country").value === "Canada") { 10 country = "CAN"; 11 } 12 if (country) { 13 $("#location-uk").removeClass("error"); 14 $("#location-uk").removeClass("valid"); 15 jToken = document.getElementById("jToken").value; 16 17 function handleResponse(data) { 18 showBuildings(data); 19 $("#location-uk").removeClass("error"); 20 $("#location-uk").addClass("valid"); 21 document.getElementById("reg_buildings").style.display = "block"; 22 document.getElementById("hint_postcode_uk").innerHTML = 23 "Please select an address"; 24 } 25 26 $.ajax({ 27 url: "/app/address-lookup/search", 28 type: "GET", 29 data: "term=" + str, 30 cache: false, 31 success: function (data) { 32 if (!data) { 33 document.getElementById("reg_buildings").style.display = "none"; 34 document.getElementById("hint_postcode_uk").innerHTML = 35 "Please provide a valid post code"; 36 $("#location-uk").removeClass("valid"); 37 $("#location-uk").addClass("error"); 38 } else { 39 handleResponse(data) 40 } 41 }, 42 error: function () { 43 handleResponse([]) 44 } 45 }); 46 } 47}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.