struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: validation method is being executed twice in IE (jCaptcha img)
Date Tue, 19 Jun 2012 09:16:26 GMT
You need to stop the default click handling; returning a false value from
the onclick attribute may be enough.

Dave

(pardon brevity and typos, on cell)
On Jun 19, 2012 5:14 AM, "lucas owen" <sr.ilustre@gmail.com> wrote:

> Sorry I got wrong idea.
>
> The problem is that I submit the form via javascript, that's why it's being
> executed twice!!
>
> <s:submit cssClass="button_02" onclick="javascript:search();"
> value="Send"/>
>
> <script type="text/javascript">
> function search(value){
> document.getElementById('index').value=0;
> document.forms['formRER'].action="searchRER.action";
> document.forms['formRER'].submit();
> }
> function navigate(value){
> document.getElementById('index').value=value;
> document.forms['formRER'].action="searchRER.action";
> document.forms['formRER'].submit();
> }
> </script>
>
> but I cant avoid JS, as I'm paginating the results and I need to submit the
> index...
>
> 2012/6/19 Maurizio Cucchiara <mcucchiara@apache.org>
>
> > Hi Lucas,
> >
> > we need some more further details...
> > What S2 stack did you define for you action? Why do you suspect that your
> > action is executed twice?
> > Could you post the java and jsp fragments?
> >
> > Twitter     :http://www.twitter.com/m_cucchiara
> > G+          :https://plus.google.com/107903711540963855921
> > Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
> >
> > Maurizio Cucchiara
> >
> >
> > On 19 June 2012 10:58, lucas owen <sr.ilustre@gmail.com> wrote:
> >
> > > Hi Struts 2 Users!
> > >
> > > I have this little problem here, only in Internet Explorer (it works in
> > > Firefox and Chrome):
> > >
> > > the action is being executed twice I think because in the JSP form I
> > have a
> > > captcha with an image and when it fetches the image it creates a new
> > > request.
> > >
> > > Anybody knows how to solve it?
> > >
> > > thanks in advance!!
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message