Camen Design Forum

Watch out for new incoming spam

Martijn

First of all, note that it is the HTML5 spec that defines the following:

“If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed.”

Previously it was only stated:

“When a pointing device is used to click on the image, the form is submitted and the click coordinates passed to the server.”

This is probably why text browsers are allowed (in a loose sense of the word) to not send any X or Y information. I would guess this goes for mobile browsers as well, but have none to test.

htmlhelp.com/… has a compatibility table with old browsers and the coordinate system.

I myself ran a test with the following code:

~~~ HTML ~~~>
<form method="post">
<label for="submit">Submit
<input name="a" type="image" src="submit.png" id="submit">
</label>
</form>
<~~~

With this code I was able to get an array in ´´$_POST´´ containing ´´a_x´´ and ´´a_y´´ items from Lynx so it should work. You will just have to test for ´´name_[xy]´´ and possible ´´name.[xy]´´ as mentioned by the WDG although I have seen no evidence of and values with a dot being send by the browser.

I do applaud you for the creative method, and it would be really interesting to see this actually block spam!

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn