By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

Imagemaps in forms? <input usemap=...>

P: n/a
Hi!
I'm reading in the html spec that the INPUT element can have a "ismap" or a
"usemap" attribute, and thus that an image map can be associated with a
form. I've searched but didn't find any example of this. Can anybody show
me/point me to a practical example? Is this feature supported by browsers?
Note: NCSA's CGI tutorial has an example named "image maps in forms", but
the example given is a plain <input type=image...>, not an image map:
http://archive.ncsa.uiuc.edu/SDG/Sof...xample-12.html

--
Rob
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Robert <no****@yahoo.com> wrote:
I'm reading in the html spec that the INPUT element can have a
"ismap" or a "usemap" attribute, and thus that an image map can be
associated with a form.


Formally, those attributes are allowed. There's no definition of their
meaning in this context, as far as I can see.

It is difficult to see what "ismap" could possibly mean unless the INPUT
element has type="image", and in that case, by definition, the image
button acts as an image map of a kind anyway: when the form is submitted,
the coordinates of the clicked location are passed in the form data. The
only natural definition for "ismap" here would be the same, wouldn't it?

Regarding "usemap", partly similar considerations apply. If the element
does not have type="image", what image could it possibly be the map's
image? And if it has, then the button effectively acts as a server side
image map anyway. Should a browser override this and use a client side
image map instead, as defined by the MAP element referred to? Hardly.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

P: n/a
On Wed, 14 Jul 2004, Jukka K. Korpela wrote:
Robert <no****@yahoo.com> wrote:
I'm reading in the html spec that the INPUT element can have a
"ismap" or a "usemap" attribute, and thus that an image map can be
associated with a form.
Formally, those attributes are allowed.


Indeed, so it seems to be, and I don't recall this puzzle being raised
before. What do we suppose the drafters of HTML4 had in mind?
Usually these attributes are used on imagemaps in the sense of
http://www.ihip.com/ , or indeed of my page at
http://ppewww.ph.gla.ac.uk/~flavell/www/imgmaptut.html or your own
well-reputed HTML tutorials.
There's no definition of their
meaning in this context, as far as I can see.
So it seems. I was reluctant to respond to this thread - thinking
perhaps that I'd missed some important point - and I'm comforted by
the fact that you seem to have no better answer than I would have
offered :-}
It is difficult to see what "ismap" could possibly mean unless the INPUT
element has type="image", and in that case, by definition, the image
button acts as an image map of a kind anyway: when the form is submitted,
the coordinates of the clicked location are passed in the form data.
indeed.
The only natural definition for "ismap" here would be the same,
wouldn't it?
Well, they don't quite submit the same data, do they?; but the end
result seems to be similar - aside from the fact that a <form>
includes other parameters in its submission.
Regarding "usemap", partly similar considerations apply. If the element
does not have type="image", what image could it possibly be the map's
image? And if it has, then the button effectively acts as a server side
image map anyway. Should a browser override this and use a client side
image map instead, as defined by the MAP element referred to? Hardly.


I'm as puzzled by this as you seem to be. What -did- they have in
mind? Furthermore, why -hasn't- this come up before??? HTML4 isn't
exactly new, but somehow, bits of it seem to emerge long after the
main event!

A google search reveals - well, to be honest it reveals:

http://www.cs.tut.fi/~jkorpela/html/401.dtd

That happens to me occasionally too :-}

So where to we go from here?

Jul 20 '05 #3

P: n/a
Thanks Jukka and Alan.
I'm somehow relieved to see that experienced web developers are as puzzled
as me by these <input usemap...>
--
Rob
Jul 20 '05 #4

P: n/a
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> writes:
On Wed, 14 Jul 2004, Jukka K. Korpela wrote:
Robert <no****@yahoo.com> wrote:
I'm reading in the html spec that the INPUT element can have a
"ismap" or a "usemap" attribute, and thus that an image map can be
associated with a form.


Regarding "usemap", partly similar considerations apply. If the element
does not have type="image", what image could it possibly be the map's
image? And if it has, then the button effectively acts as a server side
image map anyway. Should a browser override this and use a client side
image map instead, as defined by the MAP element referred to? Hardly.


I'm as puzzled by this as you seem to be. What -did- they have in
mind? Furthermore, why -hasn't- this come up before??? HTML4 isn't
exactly new, but somehow, bits of it seem to emerge long after the
main event!


http://www.htmlhelp.com/reference/ht...rms/input.html says that it
'can be used with client-side scripting', as suggested (perhaps) by
http://www.w3.org/TR/html401/interact/forms.html#h-17.4
http://www.w3.org/TR/html401/struct/...l#include-maps

A quick test reveals that IE, Konqueror, lynx, links, and w3m ignore
the image map entirely.

Mozilla and Opera use it in preference to submitting the form with the
mouse, but the button gets keyboard focus.

As for what use any of this is, the specification is rather silent -
they even mention the use of ismap on forms (explicitly noting that
type *must* be image in this case), but don't say what this should do
or why anyone would want to.

--
Chris
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.