onsubmit needs to be all lower-case, you have it written OnSubmit. Any time you get an exception saying an attribute is invalid for a tag, the TLD is the first thing you should look at, make sure the attribute is specified for the tag and that you wrote it exactly as it appears there, case and all.

Frank

john lee wrote:
I am new to struts, how can I use client javascipt inside html:form ?
when i run my test.jsp with html:form and javascript, and get following error, what is that mean ? tks everyone's help in advance. john

org.apache.jasper.JasperException:

Attribute OnSubmit invalid for tag form according to TLD
<head>
  <script language="javascript">
  function showme() {
  alert("what is wrong");
  return false;
  }
  </script>
  </head>
  <%@ taglib uri="/html" prefix="html" %>
  <%@ taglib uri="/bean" prefix="bean" %>
<html:form action="/partsearchinput" OnSubmit="return showme()">
  <table>
  <tr><td><br></td></tr>
  <tr>
  <td><bean:message key="label.search.part"/>:</td>
  <td><html:text property="part"/>
  <html:errors property="part"/>
  </td>
  </tr>
  <tr><td><html:submit/></td></tr>
  </table>
  </html:form>

---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to