title: Struts form validation with javascript?
body: <p>Hello I have the following struts form:</p>
  
  <pre><code>&lt;s:form key="frmInfo" action="insertInfo" onsubmit="return validate();"&gt;
  </code></pre>
  
  <p>And in this form I have the following:</p>
  
  <pre><code>&lt;s:textfield key="b.name" label="Name" value=""/&gt;
  </code></pre>
  
  <p>What do I put in my javascript function validate to check if something is entered for the textfield?  Should i be passing a parameter in?</p>