How to make getElementById work in Jquery?
<p>Here is the HTML and the script</p>

<pre><code> &lt;script&gt;  $(document).ready(function(){  
 $(".update_button").click(function(){ 

 var update_post = $("#post").val();
 alert('Post is '+ update_post +'.');
 return false;
 });
 });
 &lt;/script&gt;

 &lt;body&gt;
     &lt;fieldset style="width:600px; height:550px"&gt;
       &lt;textarea id="post" class="uiwysiwyg nothing"&gt;&lt;?php echo $prvpost; ?&gt;&lt;/textarea&gt;
       &lt;input type="submit" value="Post" id="updt_button" class="update_button"/&gt;
     &lt;/fieldset&gt; &lt;/body&gt;
</code></pre>

<p>Note: class="uiwysiwyg nothing" is a script the contains the WYSIWYG commands</p>

<p>But code works:</p>

<pre><code> &lt;body onsubmit="alert('Update: ' + document.getElementById('post').value); return false;"&gt;
     &lt;fieldset style="width:600px; height:550px"&gt;
       &lt;textarea id="post" class="uiwysiwyg nothing"&gt;&lt;?php echo $prvpost; ?&gt;&lt;/textarea&gt;
       &lt;input type="submit" value="Post" id="updt_button" class="update_button"/&gt;
     &lt;/fieldset&gt;
 &lt;/body&gt;
</code></pre>
