title: Clear form after submission in cakephp 1.3
body: <p>I have a form (report form) which linked multiple times on a page to a jquery dialog box. I have add random string to avoid cross posting (submission). I want to clear the form (ReportContent) field after submission, and have a little bit of problem. However it works fine on a single page access submission with a second script below. Please help,... Thanks in advance,... Chris</p>
  
  <pre><code>&lt;?php echo $ajax-&gt;form(array('type' =&gt; 'post', 'options' =&gt; array('model'=&gt;'Group', 'id'=&gt; "submitThis_".$random, 'update' =&gt; "updateGroupReport_".$group['Group']['id']. '-'.$random, 'complete' =&gt; 'javascript:resetReportGroupForm(' . $random . ');', 'url' =&gt; array('controller' =&gt; 'groups', 'action' =&gt; 'report/'. $group['Group']['id']) ) )); ?&gt;
  &lt;?php  echo $this-&gt;Form-&gt;textarea('Report.content', array('class' =&gt; "ReportContent_".$random)); ?&gt;
  &lt;?php echo $form-&gt;end('Report'); ?&gt;
  </code></pre>
  
  <p>This I want to work,... </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function resetReportGroupForm($id){
      document.getElementById("submitThis_&lt;?php echo ($random); ?&gt;"), function () {
          $('.ReportContent_&lt;?php echo ($random); ?&gt;').val('');
          };
      };
  &lt;/script&gt;
  </code></pre>
  
  <p>This works fine on a single page access,... </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function resetReportGroupForm($id){
      document.getElementById("submitThis_&lt;?php echo ($random); ?&gt;").reset(); 
      }
  &lt;/script&gt;
  </code></pre>