Re: additional onsubmit javascript validation

2010-09-23 Thread Robert Taylor
nt: Thursday, September 23, 2010 1:51 PM Subject: Re: additional onsubmit javascript validation On 9/23/10 7:48 AM, Robert Taylor wrote: I'm not sure modifying the templates will work here. css_xhtml/form-validate.ftl contains: <#if parameters.onsubmit??> ${tag.addPa

Re: additional onsubmit javascript validation

2010-09-23 Thread Dave Newton
(And binding an event to onclick or onsubmit doesn't mean that existing handlers have to go away, depending on how you do it, or if you save existing handlers.) On Thu, Sep 23, 2010 at 1:51 PM, Dale Newfield wrote: > On 9/23/10 7:48 AM, Robert Taylor wrote: > >> I'm not sure modifying the templa

Re: additional onsubmit javascript validation

2010-09-23 Thread Dale Newfield
On 9/23/10 7:48 AM, Robert Taylor wrote: I'm not sure modifying the templates will work here. css_xhtml/form-validate.ftl contains: <#if parameters.onsubmit??> ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id}();")} <#else> $

Re: additional onsubmit javascript validation

2010-09-23 Thread Robert Taylor
te files didn't reveal that this was possible by overriding a template. Maybe I missed something. /robert - Original Message - From: "Dave Newton" To: "Struts Users Mailing List" Sent: Wednesday, September 22, 2010 9:44 PM Subject: Re: additional onsubmit

Re: additional onsubmit javascript validation

2010-09-23 Thread Robert Taylor
submit attribute. If I set validate="false", then the Struts2 validation framework doesn't auto-generate the form javascript validation. /robert - Original Message - From: "Mead Lai" To: "Struts Users Mailing List" Sent: Wednesday, September 22,

Re: additional onsubmit javascript validation

2010-09-22 Thread Dale Newfield
On 9/22/10 9:44 PM, Dave Newton wrote: I modified the templates http://struts.apache.org/2.2.1/docs/template-loading.html describes how you can override existing templates within your application. -Dale - To unsubscribe, e-m

Re: additional onsubmit javascript validation

2010-09-22 Thread Mead Lai
Hi Robert, Do you have another submit button? such as , Try to bind a event listener to this button, that when you click this button, you do some validation(); Another way is using the js to remove the "onsubmit" event, then binding another method you write, and invoke the myValidation() in that

Re: additional onsubmit javascript validation

2010-09-22 Thread Dave Newton
I modified the templates to allow pages to inject their own validation messages. Unfortunately I never checked this in. You could do it with a JavaScript framework, though, through binding. Dave On Wed, Sep 22, 2010 at 9:26 PM, Robert Taylor wrote: > Greetings, > > I'm using Struts2.2.1 and have