473,463 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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:
http://archive.ncsa.uiuc.edu/SDG/Sof...xample-12.html

--
Rob
Jul 20 '05 #1
4 5083
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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
15
by: Mattia | last post by:
Hi! I have a <form> that can be submitted thruogh three buttons and I need to tell witch one was pressed when the form was submitted. I now do it with 3 <input type="submit" name="..."...
2
by: not 2 swift | last post by:
I thought I would update an old page on which I had used a <INPUT TYPE=image ...> with a <BUTTON><IMG SRC=...></BUTTON> The problem is that <BUTTON> always provides a shadow/emboss effect. Can...
3
by: TR | last post by:
Is it possible with CSS to prevent this wrapping alignment with a checkbox with a nested label? This is the label of the checkbox that wraps beneath it I'd prefer it looked like...
3
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input...
2
by: Laermans_k | last post by:
Hi, Does anyone have a solution to use the <input type="file" id="filechooser"> and the <input type="submit" id="submitbutton"> in 1 button click? I've already tried to create a javascript...
3
by: Jaime Stuardo | last post by:
Hi all... Both controls are server side. The former has more properties. Both may have associated events that are ran at server. Which one are recommended to use? is performance an issue? in...
4
by: Materialised | last post by:
Hi all, I am looking for a little help validating a forms input. On the form are key items which I do not wish to be zero length. I have wrote the following function: <script...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.