I'm trying to get the return of a script but I'm not trying to succeed.
Global
var
VRETURN : String;
Form
BtnDelete: TWebButton
Set > ElementClassName = 'delete';
After use on click button (other button)
showmessage(VRETURN);
Script:
$('.delete').click(function() {
var id = this.id;
swal({
title: "Are you sure?",
text: "Your will not be able to recover this post!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
},
function() {
alert(id);
}).then((result) => {
if (result.value) {
Swal.fire(
'Deleted!',
'Your file has been deleted.',
'success'
);
VRETURN = "OK";
}
});
});