html
<div id="confirmExecute">
<SpotfireControl id="2fe15f7fd4174c08b40c0ee27c5591c1" />
</div>
<div id="actualExecute" style="position:fixed;top:-100px">
<SpotfireControl id="7475a74b91ae474c80bf4f979bd1f56a" />
</div>
JavaScript
//setup the first spotfire sleep button (that does nothing) show a confirm dialog
document.querySelector("#confirmExecute input").onclick=function(){
Spotfire.ConfirmDialog.showYesNoCancelDialog("Confirm Execution","Do you really want to execute?",okClick,noClick,null)
}
//programatically click on spotfire control when confirming
okClick = function(x){
document.querySelector("#actualExecute input").click();
}
//display a friendly message if
noClick = function(x){
//alert("OK, no worries")
Spotfire.ConfirmDialog.showDialog("OK","No worries!",[])
}
No comments:
Post a Comment