I am trying to get this example I found on this forum to work.
I want to popup an OK alert when OK is clicked and I want the dialog to close when I click cancel. I will have this code attached to a Cancel button.
How do I declare the element #mydialog? should it be in my JSP?
$("#mydialog").dialog({modal:true, title:'Dialog Title',
resizable:false,
'buttons':{ "OK": function() { alert("OK Clicked")},
"Cancel":function() {$(this).dialog
("close");}}});
Thanks
a) It can come directly as a part of your page HTML – rendered using JSP (or any other server side technology you are using)
OR
b) It can be dynamically created just prior to initializing our dialog. This way, the HTML rendered by your server need not worry about it.
For ex: