title: how to user javascript to call action
body: <p>I have a login form in my jsp file that is referring to a javascript function using onclick function,</p>
  
  <p>The javascript function is supposed to to call an action method to do the authorization process and return the results.</p>
  
  <p>Result can be a message of error (user name is wrong) or (username or password is wrong) or a success message (return "SUCCESS") to get to new page, </p>
  
  <p>any time that it calls the action the alert(xmlHttp.status) shows that it receives "undefined" 
  it is calling a correct action but its problem is on receiving the response.</p>
  
  <p>how should I define the struts.xml? maybe the problem is caused by it.</p>
  
  <pre><code>&lt;s:submit onclick="auth(this.form)" /&gt;
  
  xmlhttp.open("get","Login.action?usrname="+usr+"&amp;pass="+psw,false);
  xmlhttp.send();
  </code></pre>