Created
March 20, 2017 18:55
-
-
Save ti-ka/efa4ccdf2f1b2da6d5e01ffb7789da50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
try { | |
//Assuming the location and filename as below | |
var url = "http://localhost:8080/homestead.txt"; | |
$.ajax(url) | |
.success( | |
function(responseText){ | |
console.log(responseText) | |
loadContentAsync(responseText) | |
} | |
); | |
function loadContentAsync(str) { | |
str = str.replace(/["']/g, ""); | |
var result = str.split('|'); | |
$("#txtAssessmentNumber").val(result[0]); | |
$("#txtBriefPropDescr").val(result[1]); | |
$("#txtPhysicalAddress").val(result[2]); | |
$("#txtPhysicalCity").val(result[3]); | |
$("#txtPhysicalZip").val(result[4]); | |
} | |
} catch (e){ | |
console.log("Homestead File not found at specified server.") | |
} | |
}); | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment