I have a requirement to submit a page, and I have opted to utilize the <input>
element for this purpose with an image that zooms slightly when hovered over.
Due to the unusual nature of my query, I was unable to find any relevant information about this topic on Google, as I could not simplify it into concise keywords.
This is the PHP code snippet. (I am aware that echoing HTML elements is generally frowned upon, but let's focus on the issue at hand.)
echo '<form method="get">';
echo '<input type="hidden" name="v" value="30" />';
echo '<div class="hover01 column">';
echo '<div>';
echo '<figure>';
echo '<input type="image" name="submit" src="http://[img host]/image.jpg" border="0" alt="Submit"/>';
echo '</figure>';
echo '</div>';
echo '</div>';
echo '</form>';
Upon clicking on the image, the GET value is passed as expected, but it also includes the x,y coordinates where the click occurred on the image:
&submit.x=24&submit.y=34
How can I remove these additional two values so that the URL appears clean and neat like this?
http://localhost/vlp/?v=5
Instead of this:
http://localhost/vlp/?v=5&submit.x=24&submit.y=34
If I change the <input>
element to an <img>
element, there are no extra GET values. However, I need to submit and reload the page with new values while maintaining the image zoom effect on hover.
Is it possible to achieve this without using JavaScript?