Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1251 How do I hide 'hotspots' on image maps so they can be found only by clicking, on both Netscape and Explorer?

You are here: irt.org | FAQ | JavaScript | Image | Q1251 [ previous next ]

The answer is a combination of fragments of scripting:

1. Put this code in each line of your image map (N.B. I mean Client Side Image Maps)

onMouseover="window.status=''; return true;"

(for extra cover you can inlude this in an onLoad call from the BODY tag as well)

2. Put this code in your image tag

style="cursor:default;"

3. Use the 'default' optional image map area, i.e.

<AREA SHAPE=default HREF="#" onMouseover="blah" onClick="return false;">

(Use this to define the rest of the image, i.e. what you want to be inert)

It works because Internet Explorer 4 (and presumably 5) takes account of step 2, redering the cursor an arrow at all times, but ignores step 3. Conversely Navigator reacts to step 3 making the cursor a pointy finger anywhere on the image. Combined with the blanking of the status bar this means that users cannot find the hotspot without blindly clicking for it.

Submitted by Dan Inch

Feedback on 'Q1251 How do I hide 'hotspots' on image maps so they can be found only by clicking, on both Netscape and Explorer?'

©2018 Martin Webb