Why does my GET request have additional parameters x and y?

When I hit the send image, I get additional parameters in the GET request:

main.php?selected=user_manager_main&mode=set_active&set_this_id=13&x=4&y=7 

Pay attention to x and y at the end. I definitely did not define x and y at the end. The values ​​seem random. Here is the form code:

 echo '<form action ="main.php" method="get">'; echo ' <input type="hidden" name="selected" value="user_manager_main" />'; echo ' <input type="hidden" name="mode" value="set_inactive" />'; echo ' <input type="hidden" name="set_this_id" value="'.$row['USER_ID'].'" />'; echo '<input type="image" src="images/delete.gif" alt="Submit" />'; echo '</form>'; 

Any ideas? Thanks!

+4
source share
4 answers

Everything is good. Take a look:

http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1

When the pointing device is used to click on the image, the form is submitted and the coordinates of the clicks are transmitted to the server. The x value is measured in pixels to the left of the image, and the y value is measured in pixels from the top of the image. The data presented includes name.x = x-value and name.y = y-value, where "name" is the value of the name attribute, and x and y values ​​are the x and y coordinates, respectively.

+18
source

These are the x and y coordinates where the user clicked on the image input

+10
source

This is no coincidence. In IE, when you send an input image, you get the coordinates at which you played on the image.

+6
source

These are the coordinates inside the image that the user clicked on. With x = 4 and y = 7, the user clicked four pixels from the left edge of the image and seven pixels from the top edge.

Key names for coordinate values ​​are formed by adding ".x" and ".y" to the name of the image button. Since you did not specify any name at all, the key names just become "x" and "y".

+1
source

All Articles