title: How to call a javascript in HttpClient or Html Unit
body: <p>I am using http client POST method to perform specific action in a website ,
  for that it uses javascript of ajax connection which produces a requestID 
  i.e <code>var reqID = Math.floor(Math.random()*1000001);</code>  to post .
  I want to access that reqID to make the action performed .
  can anyone help me regarding how to access a java script in HttpClient ?
  Or can we access the specific reqID variable of javascript using HtmlUnit ?</p>
  
  <p>My JS includes:</p>
  
  <pre><code>ajaxConnection.prototype.execute = function() {
      var reqID = Math.floor(Math.random()*1000001);
      var params = "reqID=" + reqID ;
      for (var key in this.connection_parameters) {
          params += "&amp;" + key + "=" + this.connection_parameters[key];
      }
  </code></pre>
  
  <p>and i am calling POST to get the action performed i.e </p>
  
  <pre><code>String Src = PageSource_Post("http://www.example.com/ajax/ratingClient.php", new String[][]{{"reqID",""},{"id", "329602"},{"cmd", "rate"},{"rating", "2"},}, null);
  </code></pre>
  
  <p>as of now i have kept the reqID blank and other parameters are getting from pagesource !
  <br>I am trying with HtmlUnit also like</p>
  
  <pre><code>webClient.setJavaScriptEnabled(true);
  HtmlPage firstPage = webClient.getPage("http://www.example.com/");
  HTMLScriptElement script = new HTMLScriptElement();
  </code></pre>
  
  <p>From here do i have to access the particular <code>reqID</code> variable?</p>