Use JavaScript to change the submit action based upon the criteria you listed:
function doSubmit() { if (someCondition) { document.yourForm.action = '<html:rewrite action="/actionNumeroUno" />'; } else { document.yourForm.action = '<html:rewrite action="/actionNumeroDos" />'; } } -= J > -----Original Message----- > From: yan [mailto:[EMAIL PROTECTED] > Sent: Friday, August 01, 2003 12:18 PM > To: [EMAIL PROTECTED] > Subject: 2 different submits on a single JSP - how? > > > Not sure how best to set this up and indeed, if it is > possible so any advice > would be appreciated. > > > > I have an ActionForm called 'RegisterForm' that allows a new > user to enter > their details (name, email, school name and school address) > or, an existing > registered user to edit these fields. > > > > Alongside the 'school address' field I have a submit button, > 'Find School' > that allows a user to enter part of the school name or > address and hit this > 'FindSchool' button which then goes off to another page > (selectSchool.jsp) > that displays a list of matching schools. The user then > clicks on their > chosen school on selectSchool.jsp and is then returned to the > RegisterForm > with the 'school name' and 'school address' fields populated. > > > > The user then hits another submit (either 'Register Me' or > 'Update Details') > button at the bottom of the page which saves the user details. > > > > My query is this: I am aware that I have 2 <html: form action > ="someAction"> > 's, one for the 'Find School' submit button and one for the 'Register > Me/Update Details' submit button. > > > > I have only seen examples where you have a single <html: form > action =" > someAction"> tag on a jsp. Any advice or examples on how I > can do it with > the 2 actions that I need on my one JSP > > > > Thanks in advance > > yan > > > KickStartESolutions.com > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]