JQuery Refresh the content of a UI dialog box?
<p>I have problem when i tried to invoke multiple dialog boxes in a page. I have three anchor tags on clicking 3 tags i have to generate dialog boxes with diferent contents . But when i clicked the 2nd tag i am getting the same dialog box of the previous one? How can i refresh the content inside a dialog box?</p>

<p>What i have done is given below</p>

<pre><code>$("a.delete").click(function (event) {
        DialogBox('#DeleteConfirm');
});

   $("a.message").click(function (event) {
            DialogBox('#DeleteConfirm');
    });

 var $dialog = null; function dialog() {
    // create dialog if not done already
    if (!$dialog) {
        $dialog = $("#dialogToShow").dialog({
            title: "Confirm Password",
            closeText: "Cancel",
            show:"slide",
            resizable: false,
            modal: true,
            autoOpen: false, // this is important! prevent auto open
            open: function(ev, ui){
                $('.ui-widget-overlay').stop().animate({"opacity": "0.40"}, 1480);
            },
            close: function(ev, ui){
                $('.ui-widget-overlay').stop().animate({"opacity": "0"}, 1480);
            }                  
        });
    }
    // use the reference to the dialog and call open.
    $dialog.dialog('open');
    return false; }
</code></pre>

<p>Can anybody help me?</p>
