Subject: Re: Multiple submit buttons solution
From: "Pim" <[EMAIL PROTECTED]>
 ===
Hi Ronald,

So what you actually do is adjusting the html:form action, right?

Example:
<html:form action = "createregistration">

And if I push the deletebutton -->
<a href=go('deleteregistration')><bean:message key="general.delete">

This will change to:
<html:form action = "deleteregistration">

Because this is what we figured out to do also..

My question: How do you do that with the default submit buttons
(<html:submit >)?

My guess is something like <html:submit onclick= go('deleteregistration')> .
I'm a on the right track here?

Tanx in advance,

Pim








"Ronald Haring" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> 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 ....>
>
> f> <a href=go('edit')><bean:message key="general.delete"></a>&nbsp;
>
> </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.
> >
>
>
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
>
> --------------------------------------------------------------------------
--
> ---------------
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> --------------------------------------------------------------------------
--
> ---------------
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to