We have a web site which is open to public customers. They are complaining a button is not working (on IE as reported so far). But we cannot regenerate in dev environment or even live site. The button is calling a jquery method but it seems it doesn't even hit the method when this issue occur.
Below is the method the button should fire but nothing reported in our logs as coded.
function getAddress() {
if ($('#postcode').val() == "") {
$('#postcode').addClass("txt_required");
return false;
}
else {
$.post(serverPath + "IsSessionAlive", { policyRefNo: refNo }, function (data) {
if (data.Session == 1) {
$.ajax({
type: 'POST',
url: serverPath + "GetPostcodeRelatedAddress",
dataType: 'json',
data: { code: $("#postcode").val() }
})
.done(function (data) {
try {
//console.log(data);
$("#postcode").val(data.postcode);
$("#address2").val(data.address2);
$("#town").val(data.town);
$("#city").val(data.city);
var prems = data.premises;
$('#address1').empty();
for (i = 0; i <= prems.length - 1; i++) {
$('<option/>').val(prems[i]).html(prems[i]).appendTo('#address1');
}
} catch (e) {
window.location.replace(serverPath + "Error?errcode=" + e.toString());
}
})
.fail(function (data) {
window.location.replace(serverPath + "Error?errcode=ajax fail");
});
}
else {
window.location.replace(serverPath + "SessionTimeOut");
}
});
}
My question here is what are the available approaches to catch these types of issues which devs cannot see but some unknown users are reporting they really exists?