Browse Source

disable send button when response message failed

feature/19315_Customer-Registration-new
Dinesh 7 months ago
parent
commit
14ed432f00
  1. 26
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

26
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

@ -542,12 +542,27 @@
},
success: function (response) {
// EnableCalculateButton();
// if (response.responseCode != 0) {
// ShowAlertMessage(response.responseCode, response.responseMessage);
// return;
// }
EnableSendButton();
EnableCalculateButton();
if (response.responseCode == 1) {
DisableSendButton();
DisableCalculateButton();
}
if (response.responseCode != 0) {
ShowAlertMessage(response.responseCode, response.responseMessage);
return;
}
// if (response.responseCode === 0) {
// $('#btnSend').show(); // Show the button if response code is 0
// } else if (response.responseCode === 1) {
// $('#btnSend').hide(); // Hide the button if response code is 1
// }
if (calcBy == 'c') {
$('#PayoutAmount').val(response.pAmt);
}
@ -573,7 +588,16 @@
$('#hdnProcessId').val(response.processId);
$('#hdnTPExRate').val(response.tpExRate);
},
// error: function () {
// return null;
// }
error: function () {
EnableSendButton();
EnableCalculateButton();
if (response.responseCode == 1) {
DisableSendButton();
DisableCalculateButton();
}
return null;
}
});

Loading…
Cancel
Save