calling alert
hault execution until user presses "ok". possible achieve same pause-effect when using sweetalerts
?
my callback, refreshing site, done immediately, hence user doesn't time read sweetalert. want give user time read meassage, before user presses "ok" , site automatically refresh.
linkingorunlinkingdone = function (result) { alert('this wait user click button'); swal(result.text, hardcodedtexthelper.siteautomaticallyrefresh(), result.type.tolowercase(), window.location.reload(false) ); },
according examples provided on sweetalert github, syntax used trigger function after click button in sweetalert follows :
swal({ title: "", // titles goes here text: "", // text goes here type: "", // text goes here }, function(){ // refresh function goes here });
about code provided, may aware when pass hardcodedtexthelper.siteautomaticallyrefresh() or window.location.reload(false) parameter, these functions immediatly called : hardcodedtexthelper.siteautomaticallyrefresh reference function, hardcodedtexthelper.siteautomaticallyrefresh() call function.
Comments
Post a Comment