im very new at javascript so, this is the question. I need to make a POST action every time a user hit an specific image on the web page, every image send a POST var like “image1=1″…
example: In this page, every time you hit the number to vote, it makes a post action, i need the same but with images and with an explanation of the code.
Please help me with the code. Thanks!
Note that IE has an issue when you use buttons with images, so the solution can’t be implemented with image buttons.
If I understand your question correctly, javascript is not needed to achieve what you want.
I suggest using a regular button and styling it as an image.
Something like this should work:
Demo here: http://jsbin.com/iwame3/edit