I need users to be able to open/close/reopen a dialog. I've read
other posts which imply this should work, but my minimal test below
fails (when I click on the href link, it opens properly. When I try
to reopen it a second time, nothing happens).
Am I just staring at this too long and missing something obvious?
Thanks...
<script type="text/javascript">
$(function(){
$("#terms_dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 400,
width: 500,
modal: true,
buttons: {
Cancel: function() {
$("#terms_dialog").dialog('close');
},
},
close: function() {
$("#terms_dialog").dialog('close');
},
});
});
function show_terms_dialog() {
$("#terms_dialog").dialog('open');
}
</script>
Hello, please agree to our <a href="javascript:show_terms_dialog
()">terms</a>
<div id="terms_dialog" title="Terms Of Use Agreement">
This is a dialog
</div>
--