If anyone is interested, I figured this out.  Of course this is a basic
JavaScript problem so I understand not getting a response on the Struts
list.  Never the less, I feel that it pertains enough for a solution to be
submitted.  

onSubmit is not called if you use JavaScript to submit a form.  Rather, you
must call it yourself.  So an <html:link> that submits a form, and used the
Struts Validator client side JavaScript might look like:

<html:link href="#" onclick="javascript:if
(document.forms[0].onsubmit())document.forms[0].submit()">
        Submit <bean:write name="project" property="title" />
</html:link>

Kurt Madel
Programmer, CSMi
(703) 823-4300 ext. 170


-----Original Message-----
From: Madel,Kurt [mailto:kmadel@;csmi.com] 
Sent: Thursday, October 24, 2002 9:55 AM
To: 'Struts Users Mailing List'
Subject: Submit Using <html:link> and <html:javascript>

This may seem somewhat trivial.  Never the less, look and feel is very
important to a web site.  Before using Struts, we have always used
hyperlinks to submit forms.  I am able to submit a Struts <html:form> with
an <html:link> tag, but it bypasses the client side validation created by
the Validation plug-in.  The client side validation works fine if I use an
<html:submit> button.  I would be greatly appreciative to hear if and how
anyone has gotten the <html:link> and client side <html:javascript> tags to
work together in submitting an <html:form>.

I am using the struts.jar from the 10/22 nightly build.

Thanks

Kurt Madel
Programmer, CSMi
(703) 823-4300 ext. 170


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to