<html><head>
<script language="JavaScript">
function update()
{
confirm("Are you sure?(Yes/No)");
document.forms[0].submit();
}
</script></head>
<body>
<form name="form1" method="post" action="controller/servlet">
<input type="submit" name="event" value="Add">
<input type="button" name="event" value="Update" onClick="update();">
</form>
</body>
</html>
here, on the click of both buttons "Add" and "Update",the control should go to the servlet.While clicking Update, the script runs and then the control transfers to servlet. But the name of the button Update is not read. What should be done so that the button value will be read in the servlet and the corresponding action takes place.
please help..