popup dialog (webplayer and client compatible)

1) Put this markup on a HTML
<div style='display:none' id="dialog">  
   <p>put a document property here</p>
<span id='myAlertButton1' style='border:3px outset gray;background:whitesmoke' >show dialog</span>
<span id='myAlertButton2' style='border:3px outset gray;background:whitesmoke' >create dialog</span>

2) Add this script

//tell buttons what to do when clicked

//uses dialog from markup. Useful when mixing document properties in markup. Will show only once if clicked multiple times
function showDialog(){
   //change the title attribute since we can't in html editor

//no need to have hidden dialog html markup, but creates many dialogs when clicking multiple times
function createDialog(){ 
text:'hello world',
innerHTML:'<b>hello</b> world!'  

1 comment:

Akz said...

Is there any way to call showDialog() or createDialog() from Ironpython rather than having the user click the buttons? I would like to notify the users when certain conditions occur in my Ironpython script. Thanks!