You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used your code to replace all my alert into your msgbox but its seems to be not working.
I am calling the function from a radio button click and after my logic I want to show popup success msg, but its not working .
function updateEvent(event,
actionComment, status, ecid1,
ecid2) {
//var msgBoxImagePath = "/MatchMergeAPI/img/";
var table = $('#example')
.DataTable();
var rowIndex = $(
'input[type=radio]:checked')
.closest('tr').index();
//alert(rowIndex);
var comments = table.$(
'textarea, select')
.serialize();
//alert("table:::" + table.$('textarea, select').serialize());
var comm = comments.split('&');
//alert("comm:::::::::" + comm[rowIndex]);
var actualComm = comm[rowIndex]
.split('comment=');
//alert("actualComm::::::: " + actualComm[1]);
//alert("Onclick status :::event " + event + " ::actionComment " +actualComm[1]+ " status:: " + status + " :::: ecid1 " + ecid1 + " ::: ecid2 " + ecid2);
var jsonObj = JSON
.parse('{"eventId":"'
+ event
+ '","ecid_1":"'
+ ecid1
+ '","ecid_2":"'
+ ecid2
+ '","eventDate":"","action":"'
+ status
+ '","actionDate":null,"actionComments":"'
+ actualComm[1]
+ '"}');
if (status == "approve") {
if (confirm("Are you sure you want the ecids "
+ ecid1
+ ", "
+ ecid2
+ " to merge ?")) {
//call rest
var xhttp = new XMLHttpRequest();
xhttp.open(
"PUT",
"/MatchMergeAPI/submitEventStatus",
false);
xhttp.setRequestHeader(
"Content-type",
"application/json");
xhttp.send(JSON.stringify(jsonObj));
var response = JSON.parse(xhttp.responseText);
//alert(response);
if (response['Error'] != null) {
alert(response['Error']);
} else if (response['Success'] != null) {
//Not working
/* $.msgBox({
title:"Success",
content:"The event : " + event + " has been updated successfully",
type:"info"
}); */
alert("The event : "
+ event
+ " has been updated successfully");
//$(location).attr('href',"/MatchMergeAPI/jsp/medium.jsp#soumeRoute?ecid1=&ecid2=&page=rough");
$(location).attr('href',
"/MatchMergeAPI/jsp/medium.jsp#soumeRoute?ecid1=&ecid2=&page=eventDetails");
}
} else {
//dont call rest
}
} else {
var xhttp = new XMLHttpRequest();
xhttp
.open(
"PUT",
"/MatchMergeAPI/submitEventStatus",
false);
xhttp.setRequestHeader(
"Content-type",
"application/json");
xhttp.send(JSON
.stringify(jsonObj));
var response = JSON
.parse(xhttp.responseText);
//alert(response);
if (response['Error'] != null) {
alert(response['Error']);
} else if (response['Success'] != null) {
alert("The event : "
+ event
+ " has been updated successfully");
$(location)
.attr('href',
"/MatchMergeAPI/jsp/medium.jsp#soumeRoute?ecid1=&ecid2=&page=eventDetails");
}
//call rest
/* $.ajax({
url:"/MatchMergeAPI/submitEventStatus",
method:"PUT",
data:JSON.stringify(jsonObj),
dataType:"json",
contentType: "application/json",
success:function(result,status,jqXHR){
alert(result);
if(result['Error'] != null)
{
alert(result['Error']);
}
else if(result['Success'] != null)
{
alert("The event : " + rowData[0] + " has been updated successfully");
}
$(location).attr('href',"/MatchMergeAPI/jsp/medium.jsp#soumeRoute?ecid1=&ecid2=&page=rough");
return true;
},
error:function(jqXHR, textStatus, errorThrown){
alert("Error occurred while Submitting " + errorThrown);
}
}); */
}
}
The text was updated successfully, but these errors were encountered:
I have used your code to replace all my alert into your msgbox but its seems to be not working.
I am calling the function from a radio button click and after my logic I want to show popup success msg, but its not working .
function updateEvent(event,
actionComment, status, ecid1,
ecid2) {
The text was updated successfully, but these errors were encountered: