You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ph...@digiatlas.org on 2008/08/27 14:52:39 UTC

T5: Form cancellation query

I have a form on a page and I have two buttons: Submit and Cancel. I  
have handlers for both. However, because I need two of the fields to  
be required, the client side checking never allows my handlers to be  
called if no values are inserted in the fields and the user presses  
Cancel.

How do you achieve the Cancel functionality with required fields?

thanks,
p.




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


RE: T5: Form cancellation query

Posted by Jonathan Barker <ja...@itstrategic.ca>.
The most commonly suggested method is to use a Cancel link that is stylized
to look like a button.


> -----Original Message-----
> From: photos@digiatlas.org [mailto:photos@digiatlas.org]
> Sent: Wednesday, August 27, 2008 08:53
> To: Tapestry users
> Subject: T5: Form cancellation query
> 
> 
> I have a form on a page and I have two buttons: Submit and Cancel. I
> have handlers for both. However, because I need two of the fields to
> be required, the client side checking never allows my handlers to be
> called if no values are inserted in the fields and the user presses
> Cancel.
> 
> How do you achieve the Cancel functionality with required fields?
> 
> thanks,
> p.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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


Re: T5: Form cancellation query

Posted by Baofeng Yu <ba...@moremagic.com>.
The following should work:

<input type="button" id="cancelButton" value="Cancel" 
onclick="location.href='Page1';"/>

Hope this helps!


photos@digiatlas.org wrote:
>
> I have a form on a page and I have two buttons: Submit and Cancel. I 
> have handlers for both. However, because I need two of the fields to 
> be required, the client side checking never allows my handlers to be 
> called if no values are inserted in the fields and the user presses 
> Cancel.
>
> How do you achieve the Cancel functionality with required fields?
>
> thanks,
> p.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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