Closed sathwikkrishna closed 3 years ago
on button click I'm calling a callresource function and then calling a controller method on show below, but facing an issue while calling as shown in above Screen shot.
`function callresource(Url, id, location, type) { swal("Do you want view?", { buttons: { Manually: { text: "Manually", value: "Manually", }, View: { text: "View", value: "View", } }, }) .then((value) => { switch (value) { case "Manually": swal("thanks"); break;
case "View":
swal("Are you sure?", {
buttons: {
Yes: {
text: "Yes",
value: "Yes",
},
No: {
text: "No",
value: "No",
}
},
})
.then((value) => {
switch (value) {
case "Yes":
Resize(Url, id, location, type);
break;
case "No":
swal("Got away safely!");
break;
default:
swal("Got away safely!");
}
});
break;
default:
swal("Got away safely!");
}
});
}
function Resize(url,id, location, type) {
var loc = url;
$.ajax({
url: loc, //Your path should be here
data: { id: resourceid, location: location, type: type },
type: "post",
success: function (response) {
location.reload(true);
}
});
}
`