Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are there extra parameters x and y on my GET request?

Tags:

html

forms

When I hit the submit image I get some extra parameters in the GET request:

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

Please note the x and y at the end. I certainly did not define the x and y at the end. The values seem to be 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!

like image 584
William T Wild Avatar asked Apr 13 '09 21:04

William T Wild


3 Answers

It's all ok. Look at:

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

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

like image 111
Thinker Avatar answered Sep 21 '22 01:09

Thinker


It's the x and y coords of where the user clicked on your image input

like image 39
Andrew G. Johnson Avatar answered Sep 23 '22 01:09

Andrew G. Johnson


It's not random. In IE, when you submit an input image, you get the coordinates where you cicked on the image.

like image 21
zalew Avatar answered Sep 24 '22 01:09

zalew