On Wed, Jan 26, 2011 at 15:55, code_bloke <alastair.yo...@gmail.com> wrote:

> Maybe I missing something here but I'm getting unexpected results
> observing the submit of a form.
> Given form and script below I would have expected that the form would
> not submit and the alert to be displayed, regardless of the means of
> causing the submit.
> What I find is that:
>  1: pressing return in the text box causes the alert, but does not
> stop the submit
>  2: the <button> does exactly the same
>  3: the <input type="button"> is not detected. No alert. Form submits
>  4: the Plain old submit button alerts AND stops the submission.
> Where am I going wrong??

I think you need to return false in order to stop the normal submit.
It's not enough to do Event.stop(myEvent). The function needs to
return false also.

Bertil Wennergren

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 prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to