@sawmasterMar 12.2009 — #I think maybe he means for the server to know which button was pressed. I guess put a [code=html]name="NAME GOES HERE"[/code] in the input tag. NOTICE: You should use <input type=submit>. It sounds like your using <button>.
So i want to get the value of button on jsp page using javascript that which one button was clicked,Do you think i have to define some hidden variable?? Any solution??
@ZeroKilledMar 12.2009 — #the answer was already given, read post #3. simply put a name with a value on each submit button. when sent, JSP will have an entry for the submit and the value:
<input type='submit' name='send' value='edit' />
<input type='submit' name='send' value='save' />
<input type='submit' name='send' value='open' />
notice each button have the same name with different values. say if you press 'edit', a query is sent as 'send=edit'. of course, on server you have to read the value and do the necessary task according to value. as you can see, there is no need to involve javascript.