Liz,
Try this instead: onClick="this.form.action='/ServletB';"
It should work for Netscape, & IE 4 and above.
Regards,
Peter Legowski
At 03:05 PM 7/17/00 -0400, you wrote:
>Hi,
>
>I have an HTML form on a JSP which has the user select one or more items using
>checkboxes. I have two buttons, say ButtonA and ButtonB. If the user clicks ButtonA,
>I want to post to ServletA. If the user clicks ButtonB, I want to post to ServletB.
>
>The problem is, I have to specify the form action before knowing which button the
>user will click. I've tried a couple of things that haven't worked. One is using
>something like this for ButtonB (with the form action being ServletA):
>
><INPUT Type=BUTTON name=buttonB value="buttonB"
>onClick="JavaScript:location.href='/ServletB;'">
>
>And the result is that no parameters (namely, the selected checkbox items) are sent
>to ServletB.
>
>The other thing I've tried is making ButtonB's input type SUBMIT, so it submits to
>ServletA, but using the RequestDispatcher to forward on to ServletB. What winds up
>happening here is that it does go to ServletB, but actually continues back onto
>ServletA (I assume because that's the form action.)
>
>Any ideas?
>
>thanks,
>
>Liz Stanley
>[EMAIL PROTECTED]
>http://www.gymell.com
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Peter Legowski
Unisys NASA Goddard Operations
[EMAIL PROTECTED]
301 286 3910
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html