can you click a button, send a forms content and a parameter (like id?)
is it possible to have a button that sends a form's content and have it send a parameter as well (like doSomthing?id=433)
<html:submit value="b1" onclick="this.form.reqCode.value='doSomthing'"/>
if not, how can I get the name of the button from the invoked method?
thank you
# 1
Yes you can.
In fact the code you have posted here looks like it would do it. - you are setting the hidden field reqCode (which will be submitted as a parameter) to 'doSomthing'
Normally I would write the onclick event to call a function rather than directly do something like this, but it should work.
What is it you are trying to accomplish?
# 2
I'm trying to invoke a method and from the method to tell on whan ID i was talking about (so the method will perform the operation on a specific object)
at first, I tried to that with a link but I couldn't pass the form's information (struts). I did somthing like:
<a class="menulink" href="level.do?reqCode=addlevel&level_id=6">6</a>