The question is when the user 'cancels' do you want to do anything before you forward to the home page.
If you don't need to do any processing before forwarding to the home page then just have a <html:link> to the home page. If you do ... The <html:cancel> tag generates an <input type="submit" name="org.apache.struts.taglib.html.CANCEL" value="..." onclick="bCancel=true;"/>. The javascript validations are not performed if bCancel is true and the RequestProcessor skips validations if the request contains 'org.apache.struts.taglib.html.CANCEL' As you are not using the <html:cancel> tag, you need to do what it does so that validations are not done or put your own check in the forms validate() method so that if the user is "cancelling" then don't do the validation. I guess something along the lines of... <html:image property="org.apache.struts.taglib.html.CANCEL" onclick="bCancel=true;" .....> Although I haven't tried it. Niall ----- Original Message ----- From: [EMAIL PROTECTED] To: Struts Users Mailing List Sent: Tuesday, February 24, 2004 8:45 PM Subject: RE: Validation doubt? Hi, I tried that one, but i couldnt bypass the validation...... i've an Update page, some of the attributes are mandatory. onlick of the cancel btn im forwarding it to the home page, onclick of the cancel btn it validates the form and gives error. how do i bypass that one. Note:- Im using Images and not <html:cancel> Subramaniam Olaganthan Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com "Angharad Stapleton" <[EMAIL PROTECTED]> 02/24/2004 10:17 PM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To "Struts Users Mailing List" <[EMAIL PROTECTED]> cc Subject RE: Validation doubt? Either just use javascript to send to home page, or add a path in struts-config to go to home page if cancel button was selected. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 24 February 2004 16:40 To: Struts Users Mailing List Subject: RE: Validation doubt? Hi, Thank you for the information. on click of the cancel btn i want to show the home page. how do i do that? Subramaniam Olaganthan Tata Consultancy Services Plot No. 21 Industrial Estate,, Ambattur Chennai - 600 058,Tamil Nadu India Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Vinay Kumar Munikuntla <[EMAIL PROTECTED]> 02/24/2004 10:00 PM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To 'Struts Users Mailing List' <[EMAIL PROTECTED]> cc [EMAIL PROTECTED] Subject RE: Validation doubt? Don't submit the form when user clicks on cancel button..... This will avoid calling validate method off the form bean. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 11:21 AM To: [EMAIL PROTECTED] Subject: Validation doubt? Hi, I do not want to validate my form when the user clicks the Cancel button. For your information im not using javascript validation [i.e my doesnt've <html:javascript formname="someform">] how to do this? Subramaniam Olaganthan Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com ----------------------------------------- This email, including any attachments, is for the designated recipient(s) only and may contain confidential, proprietary, and/or legally privileged information. If you are not a designated recipient, or have received it in error, please notify the sender and destroy it and all attachments and copies immediately, without distributing, disclosing, or using it in any manner. ForwardSourceID:NT0000413E ForwardSourceID:NT00004176 ------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

