Outputting Javascript from PHP, but Javascript doesn't get executed
<p>The PHP script doesn't seem to call <code>dis();</code> function..Here it is:</p>

<p>PHP:</p>

<pre><code>if (!$_SESSION['user']) {
    echo"&lt;script type='text/javascript'&gt;dis();&lt;/script&gt;";
 }
</code></pre>

<p>JS:</p>

<pre><code>  &lt;script type="text/javascript"&gt;
   function dis() {
    $(document).ready(function() {
        $("#main_text_area").attr("disabled", "disabled");
    });
    }
</code></pre>

<p>When I place just  <code>$("#main_text_area").attr("disabled", "disabled");</code> it disables correctly...but I need to do it on a function call...Thanks for comments.</p>
