<input type=image ...> is not the way to go because it submits the x,y coordinates.
When I click on an icon, I want to submit as POST or PUT, so there should be some form, input actions.
<form action="" method="PUT" name="abc_table_form">
display icons
</form>
What is the right way to do it?
Thanks.
<table>
<row1> <form action="http://google.com/123/"> <button> icon1 </button></form> </row1>
<row2> <form action="http://google.com/456/"> <button> icon1 </button></form> </row2>
</table>
The form adds extra space to the table. It looks ugly. The action in the form is different, and I believe <button> here is based on the action of form. What is the right way to deal with this?
Forms only support POST and GET.
An image input will submit a POST form (although since they are designed to be used as a server side image map, they aren’t really appropriate unless you want to submit the coordinates on the image).
<button type="submit"> <img src="..." alt="Submit"> </button>is the more semantic way to submit the form using an image (although some versions of Internet Explorer will submit an odd value in response to this).If you want to make HTTP requests using other methods (i.e. PUT) from a browser then you need to use XMLHttpRequest and construct it using JavaScript. Browser support for this is a bit variable.