title: Need help with curl post and javascript
body: <p>I'm trying to log in to some web site.
  I did it before with some other site but this site is more complicated.
  I used LIVE HTTP Headers to capture the post request.
  I noticed that the post request was done correctly but from some reason I'm not being transferred to the correct url.
  I went over the page source and I think this form is being transferred using JS.</p>
  
  <p>This is what appended to the post arguments after the __VIEWSTATE variable:</p>
  
  <pre><code>&amp;ctl00_Menu_MainMenu_ContextData=&amp;ctl00%24middleContent%24TextBoxName=0526579737&amp;ctl00%24middleContent%24TextBoxPass=LIRAN&amp;ctl00%24middleContent%24TextBoxPriv=liran&amp;ctl00%24middleContent%24CheckLicense=on
  </code></pre>
  
  <p>and this is the javascript function that validates this info:</p>
  
  <pre><code>function Continue_Click()
      {
          var LabelError = document.getElementById('ctl00_middleContent_LabelError');
          var lnkButton1 = document.getElementById(middleContent + 'lnkButton1');
          var msg = validateLoginPeleNumRecognizeUser(document.getElementById('ctl00_middleContent_TextBoxName').value);
          if (msg == '')
          {
              if (validateLoginPeleNumEmail(document.getElementById('ctl00_middleContent_TextBoxName').value)){
                  musixMail = document.getElementById('ctl00_middleContent_TextBoxName').value;
                  var obj = document.getElementById('ctl00_middleContent_TextBoxPriv');
                  if (obj != null &amp;&amp; obj.value != '')                    
                      msg = validateLoginUserLogin(obj.value);
  
                  if (msg == '')  
                  {                        
                      if(document.getElementById('ctl00_middleContent_CheckLicense').checked)
                      {
                          if(log.login('recognize'))
                          {
                              __doPostBack('ctl00$middleContent$lnkButton1','');
                          }
                      }
                      else
                          LabelError.innerHTML = 'עליך להסכים לתנאי השימוש על מנת להמשיך לגלוש באתר';
                  }
                  else
                      LabelError.innerHTML = msg;
              }
              else{
                  msg = validateLoginPasswordLogin(document.getElementById('ctl00_middleContent_TextBoxPass').value);
                  if (msg == '')    
                  {
                      var obj = document.getElementById('ctl00_middleContent_TextBoxPriv');
                      if (obj != null &amp;&amp; obj.value != '')                    
                          msg = validateLoginUserLogin(obj.value);
  
                      if (msg == '')  
                      {                        
                          if(document.getElementById('ctl00_middleContent_CheckLicense').checked)
                          {
                              if(log.login('recognize'))
                              {
                                  __doPostBack('ctl00$middleContent$lnkButton1','');
                              }
                          }
                          else
                              LabelError.innerHTML = 'עליך להסכים לתנאי השימוש על מנת להמשיך לגלוש באתר';
                      }
                      else
                          LabelError.innerHTML = msg;
                  }   
                  else
                      LabelError.innerHTML = msg;
              }
          }
          else
              LabelError.innerHTML = msg;
      }        
      $(function(){
          $('#ctl00_middleContent_TextBoxName,#ctl00_middleContent_TextBoxPass,#ctl00_middleContent_CellName').keypress(function(e){
              if(e.keyCode==13)                
                  Continue_Click();
          });
  </code></pre>
  
  <p>Does anyone know how can I trigger this function when using curl?</p>
  
  <p>Thanks</p>