Results 1 to 1 of 1

Thread: using an image input for form submit

  1. #1
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default using an image input for form submit

    I didnt realise it before, but when you use and image instead of the usual submit button as in:

    <input type="image" src="/path/to/image" />

    after submitting html includes the x & y coordinates of where you clicked. so in a get string you will have x=<x-offset>&y=<y-offset>

    In addition, if you were to include a name with that.
    <input type="image" src="/path/to/image" name="my_button" />

    you will get my_button.x=<x-offset>&my_button.y=<y-offset>

    be careful tho, if you are using php, (my preffered scripting lang currently for handling front end procession), you will get in your $_GET global, my_button_x, and my_button_y, the . is replaced with an underscore
    Last edited by alexdevmaster; Jan 10, 2006 at 08:53 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •