Prevent form from being onSubmit()'ed when button is called

View: New views
3 Messages — Rating Filter:   Alert me  

Prevent form from being onSubmit()'ed when button is called

by hbf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My form as a onSubmit() implementation and, in addition, contains a  
button. If
I hit the button, both the button and the form's onSubmit() is  
executed as
expected. How can I prevent the form's onSubmit() from being executed?

(I tried using a Link, but this bypasses the form processing  
completely, so
setObject() is not called on my models -- which is not what I want.)

Many thanks,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown RE: Prevent form from being onSubmit()'ed when button is called

by Jeremy Thomerson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not at a computer and it's been a while since I've done this, but I think there's a method like "Form.setDefaultFormProcessing(false)" that you can call from within your button.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-----Original Message-----
From: Kaspar Fischer <fischerk@...>
Sent: Saturday, July 19, 2008 10:24 AM
To: users@...
Subject: Prevent form from being onSubmit()'ed when button is called

My form as a onSubmit() implementation and, in addition, contains a  
button. If
I hit the button, both the button and the form's onSubmit() is  
executed as
expected. How can I prevent the form's onSubmit() from being executed?

(I tried using a Link, but this bypasses the form processing  
completely, so
setObject() is not called on my models -- which is not what I want.)

Many thanks,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Prevent form from being onSubmit()'ed when button is called

by Ladislav Thon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, you should call setDefaultFormProcessing(false) on your button. And if
you want to submit the form using a link, use SubmitLink instead (it has
setDefaultFormProcessing method too).

LT

2008/7/19 Jeremy Thomerson <jeremy@...>:

> I'm not at a computer and it's been a while since I've done this, but I
> think there's a method like "Form.setDefaultFormProcessing(false)" that you
> can call from within your button.
>
> Jeremy Thomerson
> http://www.wickettraining.com
> -- sent from a wireless device
>
>
> -----Original Message-----
> From: Kaspar Fischer <fischerk@...>
> Sent: Saturday, July 19, 2008 10:24 AM
> To: users@...
> Subject: Prevent form from being onSubmit()'ed when button is called
>
> My form as a onSubmit() implementation and, in addition, contains a
> button. If
> I hit the button, both the button and the form's onSubmit() is
> executed as
> expected. How can I prevent the form's onSubmit() from being executed?
>
> (I tried using a Link, but this bypasses the form processing
> completely, so
> setObject() is not called on my models -- which is not what I want.)
>
> Many thanks,
> Kaspar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
LightInTheBox - Buy quality products at wholesale price