How to use an image as a submit button in struts to invoke a dispatch action.When i use a image as button it get transfered as co-ordinates which create error in dispatching to specific methods. For eg. <form action="logaction"> <input type="image" name="login" value"log" src="Images/log.jpg"/> </form>
Originally posted by Anirvan Majumdar: You could use the <img> tag between <a> tags to have the same effect, and also, it has worked without any troubles to this date.
[ April 28, 2008: Message edited by: Anirvan Majumdar ]
Thank you Anirban for your response.What i want actually is i need to pass a request parameter named="method" and value="add" along with other request parameters to dispatch action.I have configured the action in this way.
I need a image which would act as button and would invoke dispatch action with a request parameter along with other parameters.My problem get solved when i replace the image with normal button which i dont need.
Joined: Feb 22, 2005
I don't see what could cause a problem if you specify the URL to access on click of the image through the "href" attribute of the <a> tag.
and your JS function could have the following structure: