in reply to Image input type + POST request

My HTML/XHTML book (the Koala) says the name attribute is optional, but does not indicate how to handle this case. From a practical standpoint, without a name, it's unclear how anyone would get at the coordinates in a CGI program.

I'd suggest just submitting the form normally. Anyone who uses an image as a submit button (such as 'search' in the header up above) doesn't care where the mouse was when the user clicked. Either name your input elements, or ignore them.

If I remember, I'll dig through an RFC later.

Replies are listed 'Best First'.
Re: Re: Image input type + POST request
by chiller (Scribe) on Aug 24, 2001 at 21:39 UTC
    After some twiddling around I found out:

    To submit a form which uses an 'image' input tag, and the tag has no name, simply use x and y:

    x=0&y=0

    and the form will submit. On really picky servers anyway.