' + title + '
' + $('locationcity', this).text() + '
$(document).ready(function () {
$.ajax({
type: "POST",
url: 'https://www.hrgp.co/AdvancedWidget.asmx/ReturnJobs',
data: "{'strOrgName':'LawnSavers Plant Health Care Inc.'}",
contentType: "application/json; charset=utf-8",
success: ajaxCallSucceed,
dataType: "json",
failure: ajaxCallFailed
});
});
function ajaxCallSucceed(response) {
var $jobsxml = $.parseXML(response.d);
var strstring = '';
$('Job', $jobsxml).each(function () {
var title = $('title', this).text();
strstring += '
' + $('locationcity', this).text() + '
});
$('#divResults').html(strstring);
}
function ajaxCallFailed(error) {
$('#divLoading').hide();
alert('error: ' + error);
$('#divResults').hide();
}