Skip to content

Instantly share code, notes, and snippets.

@bhavjot
Created January 10, 2019 05:13
Show Gist options
  • Save bhavjot/f1e969d58cd2ad5af490bcf7292315e2 to your computer and use it in GitHub Desktop.
Save bhavjot/f1e969d58cd2ad5af490bcf7292315e2 to your computer and use it in GitHub Desktop.
let userRValue = toastr.warning("This query name already exists. Query will be saved as name_copy. <br /><button type='button' value='yes' class='btn clear'>Yes</button><button type='button' value='no' >No</button>",
'Are you sure to continue?',
{
allowHtml: true,
timeOut: 0,
extendedTimeOut: 0,
onclick: function (toast) {
let userResponseValue = toast.target.value;
if (userResponseValue == 'yes') {
console.log(toast.target.value, 'carai');
// Save it!
return true;
}
else {
// Do nothing!
return false;
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment