Re: Disable submit button

2006-05-31 Thread A Amarakoon

Gareth, Monkeyden, Jorge, Andy Thank you..

This js lib looks good.

this code fixes it: onclick="this.disabled=true;submit()"

rukka


- Original Message -
From: Gareth Evans <[EMAIL PROTECTED]>
Date: Wednesday, May 31, 2006 11:02 am
Subject: Re: Disable submit button

> Hi,
> 
> I use the following script to do this, it requires the prototype 
> javascript library:
> 
> function disableOnClick ( className ) {
> var elements = document.getElementsByClassName( className );
> for ( var index = 0; index < elements.length; index ++ ) {
> Event.observe( elements[index] , 'click', buttonOnClick );
> }
> }
> 
> function buttonOnClick( e ) {
> Try.these(
> function() {
> e.srcElement.disabled = true;
> e.srcElement.form.submit();
> } ,
> function() {
>e.target.disabled = true;
> }
> );
> }
> 
> 
> e.g. in your html/jsp page
> 
> 
> 
>   disableOnClick( 'submitButton' );
> 
> 
> 
> 
> Some docs on the prototype.js
> 
> http://www.sergiopereira.com/articles/prototype.js.html
> 
> 
> 
> 
> Hope that helps
> 
> Gareth
> 
> A Amarakoon wrote:
> > Thank you for quick reply.. This does not work for me..
> > 
> > once you click the submit button it disables button. but does 
> not submit action to
> > the server. May be I am missing something??
> > 
> > thanks
> > 
> > rukka
> > - Original Message -
> > From: Jorge Mart�n Cuervo <[EMAIL PROTECTED]>
> > Date: Wednesday, May 31, 2006 9:19 am
> > Subject: Re: Disable submit button
> > 
> >> 
> >>
> >> this works well
> >>
> >>
> >> PD: i've tested in firefox
> >>
> >> El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:
> >>
> >>> As a part of solution  to multiple reloads and to block the 
> >> multiple 
> >>> submit requests in long running service layer methods, we like to
> >>> disable submit button once user hit that once. Does 
> html:submit 
> >> button 
> >>> tag has java scripts associated with it?
> >>>
> >>> If you do have any links on client side fix, I appriciate that.
> >>>
> >>> thanks
> >>>
> >>> rukka
> >>>
> >>>
> >>> ---
> --
> >> 
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >> -- 
> >> ;-)
> >> 
> >> Jorge Martin Cuervo
> >> Analista Programador
> >>
> >> Outsourcing Emarketplace
> >> deFacto Powered by Standards
> >>
> >> email <[EMAIL PROTECTED]>
> >> voz +34 985 129 820
> >> voz +34 660 026 384
> >> 
> >>
> > 
> > -
> 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> ---
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: Disable submit button

2006-05-31 Thread A Amarakoon
Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not submit action 
to
the server. May be I am missing something??

thanks

rukka
- Original Message -
From: Jorge Mart�n Cuervo <[EMAIL PROTECTED]>
Date: Wednesday, May 31, 2006 9:19 am
Subject: Re: Disable submit button

> 
> 
> this works well
> 
> 
> PD: i've tested in firefox
> 
> El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:
> 
> > As a part of solution  to multiple reloads and to block the 
> multiple 
> > submit requests in long running service layer methods, we like to
> > disable submit button once user hit that once. Does html:submit 
> button 
> > tag has java scripts associated with it?
> > 
> > If you do have any links on client side fix, I appriciate that.
> > 
> > thanks
> > 
> > rukka
> > 
> > 
> > -
> 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -- 
> ;-)
> 
> Jorge Martin Cuervo
> Analista Programador
> 
> Outsourcing Emarketplace
> deFacto Powered by Standards
> 
> email <[EMAIL PROTECTED]>
> voz +34 985 129 820
> voz +34 660 026 384
> 
>

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



Re: response.addHeader problem

2006-03-30 Thread A Amarakoon

By the way my struts.config looks like this.


http://localhost:8080/HeadSimulator/checker.do"; redirect="true" 
contextRelative="false" />


- Original Message -
From: A Amarakoon <[EMAIL PROTECTED]>
Date: Thursday, March 30, 2006 9:14 am
Subject: response.addHeader problem

> 
> Struts 1.2.7 on windows.
> I am trying add cutom http header within action. The I do redirect 
> to a another web app. Problem I have is that web app does not see 
> the headers I added. 
> 
> Am I missing something?
> 
> my action class:
>response.addHeader("header1","myFirstHeader");
>response.addHeader("header2","mySecondHeader");
> 
>   ActionForward toAction= new ActionForward ();
>   ActionForward fromAction = mapping.findForward("destUrl");
>   fromAction.setPath(fromAction.getPath());
>   toAction.setRedirect(true);
>   return toAction;
> 
> 
> thanks
> 
> rukka
> 
> 
> 
> ---
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



response.addHeader problem

2006-03-30 Thread A Amarakoon

Struts 1.2.7 on windows.
I am trying add cutom http header within action. The I do redirect to a another 
web app. Problem I have is that web app does not see the headers I added. 

Am I missing something?

my action class:
response.addHeader("header1","myFirstHeader");
response.addHeader("header2","mySecondHeader");

   ActionForward toAction= new ActionForward ();
   ActionForward fromAction = mapping.findForward("targetUrl");
   fromAction.setPath(fromAction.getPath());
   toAction.setRedirect(true);
   return toAction;


thanks

rukka



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