jQuery Dialog Not Working Twice?
2009-11-11 09:30:03 | 0 Comment
I was developing a web site for a client of mine when I have faced this error. I was creating the dialog like the following:
<script type="text/javascript">
function bb()
{
$("#dialog").dialog({height: 1000, width: 1000, modal: true});
}
</script>
/* HTML */
<div id="dialog">dialog content..</div>
By using this, I couldn't succeed to show the dialog twice. Here is my solution:
<script type="text/javascript">
function bb()
{
$("#dialog").dialog({height: 1000, width: 1000, modal: true,
close: function() { $("#dialog").dialog('destroy'); }
});
}
</script>
What I have done is simply destroying the dialog on the close event instead of disabling it by default.

Comments
Leave a Response