gsr
06/20/2022, 4:00 PMryan
06/20/2022, 4:03 PMajax()
method in jQuery.
https://api.jquery.com/jquery.ajax/gsr
06/20/2022, 4:03 PMgsr
06/20/2022, 4:03 PMryan
06/20/2022, 4:05 PM$.ajax({
url: '/modules/labelview/labelview.cfc',
type: 'get',
dataType: 'json',
data: {"method":"export"},
success: exportSuccess
});
exportSuccess
is user-defined function to handle the success response, which is the following:
function exportSuccess(data) {
data = JSON.parse(data);
fileExists("/#filename#").then(function(yes){
if (data && yes) {
$('##waiting').hide();
$('##download').show();
return true;
} else {
$('##waiting img').hide();
$('##waiting-content').html('Something went wrong. Please refresh this page to try again.');
return false;
}
});
}
ryan
06/20/2022, 4:07 PMryan
06/20/2022, 4:08 PM