title: javascript button click using curl
body: <p>I have parsed a page using curl and it contains some check box and a 'select all' and a 'submit' button . Clicking the button selects every check box.'select all' button triggers a javascript function which actually select all check box.</p>
  
  <p>Now i need to click 'select all' and 'submit' button.How can I do this ??</p>
  
  <p>Here is the button code:</p>
  
  <pre><code>input type="button" onclick="SelectAll(137)" value="Select All"
  </code></pre>
  
  <p>Here is the js function:</p>
  
  <pre><code>function SelectAll(n)
  {
      for(i=0;i&lt;n;i++)
      document.getElementById("ch"+i).checked=true;
  } 
  </code></pre>