You just cannot use type=button and expect it to work with Netscape.
It's not clear why you are using type=button for the third button,
why not just use the submit type it, using the second name.
>From what I see of your handler code, this should work fine.
If you actually don't want a submit from the third button, use "return
false;" in its onClick handler:
<input type="submit" name="dontSubmit" onClick="doSomething(); return
false;" value="Do Something">
This will produce a button labelled "Do Something" that when clicked
executes your doSomething() javascript method, but does not actually
submit the form...
Lance
-----Original Message-----
From: Meng, Dong J (CAP, CDI) <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, September 30, 1999 11:36 AM
Subject: button problem in Netscape
>I one HTML page, I have three buttons, two of them are 'Submit' button
type
>with the same name, one is 'Button' type with different name to hand
>JavaScript. If you click one button, it will do post to call a servlet
page.
>In the servlet page, I use the following code to determine which button
has
>been clicked.
> if ((String)req.getParameter("submitButton") != null) //click
Submit
>button, submitButton is these button's name
> button = (String)req.getParameter("submitButton");
> else //'Button'
type
>button be clicked
> button = "button";
>
>when I click Submit button, it is no problem. When I click 'Button' type
>button, it work for IE, but for Netscape, the brower do not know this
>button, it default the first 'Submit' button.
>Do you know why and solve this problem.
>
>Thanks.
>
>DJ
>
>_________________________________________________________________________
__
>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
>
___________________________________________________________________________
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