Can't find what's wrong in this code
<p>I have the following script which brings up a dialog on my screen telling me there has been an error:</p>

<pre><code>&lt;script type="text/javascript"&gt;
var myFunc = function() 
{
    var html='&lt;div class="cs-body"&gt;explanation of the error&lt;/div&gt;';
    $(html).csDialog();
    return false;
};
&lt;/script&gt;
</code></pre>

<p>I want this dialog to pop-up when my php script returns a "1" value for $error, like this:</p>

<pre><code>if ($error==1) {
echo "&lt;script type='javascript'&gt;$(document).ready(myFunc)&lt;/script&gt;";
}
</code></pre>

<p>Even if I leave the if-clause and just echo the script it doensn't do anything. Can somebody tell me what I'm missing here?</p>

<p>Thanks in advance! </p>
