Sure. You can use the form itself for that:

        $('id_of_form').observe('submit', function(evt){
                //your code here
        });

I'd seriously recommend a quick read of the entire API Docs site: 
http://api.prototypejs.org/ -- it shouldn't take more than an hour -- which 
will acquaint you with the basics and show you examples of each of the methods.

Did you look at my example? That has a very succinct approach to busying out a 
button, which you might want to try.

Walter

On Jun 22, 2012, at 1:19 PM, Anis Ahmed Chohan wrote:

> 
> Nope haven't tried console log. Will give it a go.
> 
> @Walter same results using invoke. does prototype have a submit alternative 
> to click event? 
> 
> 
> 
> 
> Sent from Samsung Mobile
> 
> "Miguel Beltran R." <[email protected]> wrote:
> Sometimes when firebug don't show me an error I use the "error console" and 
> saw things like ") not close" or something like that
> 
> are you tried it?
> 
> 2012/6/22 AnichoCode <[email protected]>
> Hello Walter,
>  
> I noticed that consistent error in the script too, the script should when the 
> button is clicked hide the button and in the same place display a processing 
> image a little gif.
> 
> The same script works on pages but not in jsfiddle or that particular page 
> for some odd reason.
> 
> With your code from previous post for consistency with other functions can I 
> do the below or will that not work?
>  
> $('.ShowPleaseWait').observe('click', function(evt){
> //do something here
> });
> 
> On Friday, June 22, 2012 3:39:31 PM UTC+1, Walter Lee Davis wrote:
> Well, you had a consistent error in the script, owing (possibly) to the way 
> that jsfiddle renders the script. The function StopTimer() wasn't declared in 
> the global scope, so your inline handler couldn't see it or use it. I fixed 
> that by moving it into a script block at the top of your HTML, but that 
> didn't seem to change anything else about the page. I'm not clear what it's 
> supposed to do in any case. 
> 
> One thing you could try is to remove the onclick inline handler, and change 
> it to an unobtrusive observer: 
> 
> $('centrecolumn_0_dealingcentrecolumn_0_ibtnContinue').observe('click', 
> function(evt){ 
>         //do something here 
> }); 
> 
> Observers can be "stacked", so as long as this handler doesn't clobber the 
> event with stop() or return false, you should be able to have more than one 
> event handler respond to the one event should you need to. 
> 
> Walter 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/prototype-scriptaculous/-/cTtUIKhgkCMJ.
> 
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 
> 
> 
> -- 
> ________________________________________
> Lo bueno de vivir un dia mas
> es saber que nos queda un dia menos de vida
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to