jquery dialog("open") the content is not show
<p>using jquery dialog for a while, but now  an experience a strange behavior.</p>

<p>Calling:</p>

<pre><code>$('#dialog-form').dialog({
    autoOpen: false,
    width: '700px',
    modal: true,
    hide: 'slide'
});

$('#dialog-form').dialog('option', 'buttons', {
'add' : {
    text: labelAdd,
    click: function() {
        doadd = true;
        if (typeof checkRow !== "undefined") { doadd = checkRow() };
        if (doadd) { exec(); }
    }}, 
'Cancelar': function() {$(this).dialog('close'); }
});
$("#dialog-form").dialog("open");

function exec() {
$('#dialog-form').dialog('close');
/* execute some remote code using ajax call*/
if (error) {
    $('#dialog-form').dialog('open');
    return false
}
return true;
}
</code></pre>

<p>the dialog is not show correctly. It shows the "ui-widget-overlay", but not the dialog content.</p>

<p>it happens to me two of tree times that i call the function.</p>

<p>for what i could see the display property in the is set to none.</p>

<p>the resulting html code:</p>

<pre><code>div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable" style="display: none; z-index: 1002; outline: 0px none; position: absolute; height: auto; width: 700px; top: 0px; left: 320.5px;" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-dialog-form"&gt;
</code></pre>

<p>i manually set display to block using firebug, and it works ok.</p>

<p>Btw, if i pulse "esc" i can see the animation hiding the dialog.</p>

<p>Can i set from js the display for the div content? Or should i open / close the dialog differently?</p>

<p>Thanks for the help.</p>

<p>António</p>
