Hi Ronald, Sorry, maybe I should put it in the subject. I would like to solve this problem without using javascript.
Thanks, Peter. -----Original Message----- here is what I usually use, using links and submit <head> <javascript> function go(whatAction) { document.forms[0].action.value=whataction; document.forms[0].submit(); } </script> </head> <body> <html:form> <input type=hidden .....> <html:hidden ...> <input type=text ....> <a href=go('del')><bean:message key="general.delete"></a> <a href=go('edit')><bean:message key="general.delete"></a> </html:form> hope this helps Gr Ronald > -----Original Message----- > From: Peter Severin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 06, 2002 8:34 AM > To: keithBacon; struts-user > Subject: Re: Multiple submit buttons solution > > > Hi Keith, > > Yes you can use links but sometimes you need to submit the > form for each > action. I'll give you an example: > <form action="/updateTest.do"> > <input type="text" name="name"> > > <!-- <iterate> test questions. one row per question. I omit the > table tags for simplicity--> > Question name > Question text > <input type="submit" name="questionId_10" value="Delete"> > <!-- </iterate> > </form> > > So basically you have a form with some fields and a list which also > makes part from the form. If you change the test name from the example > above and then click Delete button on one of the questions > the form will > be submitted and you will not lose the changes you have made > to the test > name. But you will lose this changes if you use links. > Regarding buttons > ugliness - I agree, but you could use some images of smaller size > instead of buttons. > > Hope it was clear. > > Regards, > Peter. > > --- Peter Severin <[EMAIL PROTECTED]> wrote: > Hi Peter, > I just use links to do this. (I think you can use an Image as well). > Buttons are a bit ugly so I don't need this functionality. > There's lots in struts so I don't favor adding more. > Keith. >
smime.p7s
Description: S/MIME Cryptographic Signature