473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

USEMAP attribute for IMG

I'm confused about valid values for the IMG element's USEMAP
attribute.

According to this specification, "the value of usemap must match the
value of the name attribute of the associated MAP element":
http://www.w3.org/TR/REC-html40/stru...ml#adef-usemap

So, for example, I'd expect to write
<img src="blah.png" usemap="mymap" ... >
<map name="mymap" ... >

However (at least in MSIE 6.0), such an image map does not work. A
hash sign must be prepended to the usemap attribute ("#mymap") or none
of the clickable regions will be active, making the map useless. This
suggests to me that usemap is actually a URI (and might just as well
be written "thispage.html#mymap") - but it contradicts the
specification.

Is this an IE bug? What values are really valid?

Eq.
May 3 '06 #1
1 3078
On Wed, 3 May 2006, Paul E Collins wrote:
According to this specification, "the value of usemap must match the
value of the name attribute of the associated MAP element":
http://www.w3.org/TR/REC-html40/stru...ml#adef-usemap
The formal specification however says that the value of a usemap
attribute is a URI.

RFC1980, the original definition of client-side imagemaps, included
the possibility that the imagemap could be in an external document,
referenced by the URI specified in the USEMAP attribute. In practice,
the full specification did not get widely implemented: one is expected
to specify the anchor of a MAP element within the current document.
However (at least in MSIE 6.0), such an image map does not work. A
hash sign must be prepended to the usemap attribute ("#mymap")


[...]

When it says "must match", it doesn't mean "must be equal to".

See the examples
http://www.w3.org/TR/REC-html40/stru...tml#h-13.6.1.1
for sample usage.

h t h
May 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert | last post by:
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...
2
by: Luciano \(DOC\) | last post by:
I change an image using a map by rolling over a button. The point is I have to change the map as well. I tried this way: document.images.usemap = "#" + NewMap; but it seems not to wrok. Do...
2
by: LEMAIRE Mathieu | last post by:
I wanna change the usemap of an image with JS.. how to do it ? Here's what I've tried (doesn't work) : <img src='contenu.jpg' alt='' name='contenu' usemap='#map1'/> <map name="map1"><area...
0
by: Jeronimo Bertran | last post by:
Hi, I have a page that includes an image that uses an image map. When the user clicks on a button, the image needs to be refreshed and the map needs to be updated without refreshing the entire...
1
by: Arne | last post by:
I am try to convert a classic ASP program to ASP.Net. I have an <img> tag that I want to convert to <asp:image>. The <img> has an attribute called usemap. I can't find the corresponding attribute...
0
by: Demetri | last post by:
I have a problem: I have an image that I need to display and if a user clicks anywhere on the image I need the coordinates. So I am using an ImageButton, which is good, works great for capturing...
2
by: gary.goodwin | last post by:
HI I am trying to understand Attribute usage. For example the class SerializableAttribute is a class correct? So why when it is actually u sed the "Attribute" portion of the name is dropped. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.