mengu on web programming.

jQuery Dialog Not Working Twice?

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

No comments made for this post.

Leave a Response

No HTML allowed. You can use markdown.
Name*:
E-Mail* (not published):
Web site:
Response: