What is the POST for <input type = "image">

Discussion in 'Code Snippets and Tutorials' started by Ryan, Jun 23, 2007.

Thread Status:
Not open for further replies.
  1. Ryan

    Ryan Level II

    Joined:
    Jan 23, 2007
    Messages:
    251
    Likes Received:
    1
    How do you post the coordinates of the optical recognition image when you buy an item? Aka, what does the address look like? I assume you just tag on the offer and coordinates of the click to the haggle page but I am not sure.
     
  2. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    use a packet sniffer and you'll see in the post data x=345&y=234 and the replace tose with the ocr x and y
     
  3. tac123

    tac123 Level I

    Joined:
    Apr 29, 2007
    Messages:
    124
    Likes Received:
    0
    Your title was "What is the POST for <input type="image">?"

    The post for input type image actually depends on the NAME attribute in the input tag.

    The POST data is of the format:
    name.x=[x coordinate]
    name.y=[y coordinate]

    So for the image <input type="image" name="mypicture"> the an example of the data sent would be:

    ?mypicture.x=12&mypicture.y=232

    It just so happens on neopets, they neglected to provide a name attribute for their input, so it defaults to simply ?x=&y=
     
Thread Status:
Not open for further replies.