I have multiple images inside one form. Depending on the image clicked a specific value should be sent with a POST.
Can this be done without javascript? (I use jquer
The safe approach to this problem is to give the inputs unique names and see which one sends coordinates.
Only the successful control will send any data. So test to see if submit_blue.x
has a value, then test if submit_red.x
has one.
There is no need to involve JavaScript at all.
Alternatively, use regular submit buttons instead of server side image maps.
… keeping in mind that this will break in old-IE as it doesn't support properly.