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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

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

    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:


    --
    Rob
  • Jukka K. Korpela

    #2
    Re: Imagemaps in forms? &lt;input usemap=...&gt;

    Robert <nospam@yahoo.c om> wrote:
    [color=blue]
    > 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.[/color]

    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

    Comment

    • Alan J. Flavell

      #3
      Re: Imagemaps in forms? &lt;input usemap=...&gt;

      On Wed, 14 Jul 2004, Jukka K. Korpela wrote:
      [color=blue]
      > Robert <nospam@yahoo.c om> wrote:
      >[color=green]
      > > 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.[/color]
      >
      > Formally, those attributes are allowed.[/color]

      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.
      [color=blue]
      > There's no definition of their
      > meaning in this context, as far as I can see.[/color]

      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 :-}
      [color=blue]
      > 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.[/color]

      indeed.
      [color=blue]
      > The only natural definition for "ismap" here would be the same,
      > wouldn't it?[/color]

      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.
      [color=blue]
      > 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.[/color]

      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:



      That happens to me occasionally too :-}

      So where to we go from here?

      Comment

      • Robert

        #4
        Re: Imagemaps in forms? &lt;input usemap=...&gt;

        Thanks Jukka and Alan.
        I'm somehow relieved to see that experienced web developers are as puzzled
        as me by these <input usemap...>
        --
        Rob

        Comment

        • Chris Morris

          #5
          Re: Imagemaps in forms? &lt;input usemap=...&gt;

          "Alan J. Flavell" <flavell@ph.gla .ac.uk> writes:[color=blue]
          > On Wed, 14 Jul 2004, Jukka K. Korpela wrote:[color=green]
          > > Robert <nospam@yahoo.c om> wrote:[color=darkred]
          > > > 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.[/color]
          > >
          > > 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.[/color]
          >
          > 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![/color]

          http://www.htmlhelp.com/reference/ht...rms/input.html says that it
          'can be used with client-side scripting', as suggested (perhaps) by



          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

          Comment

          Working...