Page disappears when scriptmanager calls jquery dialog
<p>I got a problem in my Asp.net application.
When I try to save some data, I check if the data is right, When not I call a jquery dialog with the error message. But when my jquery dialog appears, my background form dissapears.
and I get a javascript error: "html parsing error unable to modify the parent container element before the child element is closed".</p>

<p>This is my jquery dialog call in codebehind:</p>

<pre><code>    string script = "openDialog('" + text + "', '" + title + "');";
    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "open", script, true);
</code></pre>

<p>This is my jquery dialog in my masterpage:</p>

<pre><code>    function openDialog(text, title) {
    var $dialog = $('&lt;div&gt;&lt;/div&gt;')
    .html(text)
    .dialog({
        autoOpen: false,
        title: title,
        modal: true,
        height: 100,
        width: 220,
        buttons: {
            Ok: function() {
                $(this).dialog('close');
            }               
        },
        open: function(event, ui){
            $('body').css('overflow','hidden');
        }           
    });

    $dialog.dialog('open');
}
</code></pre>

<p>I have some pages where I have the same code and there it works?</p>
