Re: JavaScript using image maps
by Alan Carvalho <alancarv(at)sti.com.br>
|
Date: |
Mon, 20 Nov 2000 04:40:48 -0200 |
To: |
hwg-basics(at)mail.hwg.org |
In-Reply-To: |
sportsstuff |
|
todo: View
Thread,
Original
|
|
[Shawn]
>Is it possible to apply a JavaScript action to a specific
>image map? I'm trying to make certain features and
[Alan]
Yes, according the JavaScript specification published on
http://developer.netscape.com
You can use the following event handlers in AREA tags:
ondblclick
onmouseover
onmouseout
I tested onclick handler in AREA tag (IE 5.5 and NN 4.73) and it works too.
Follow is an example.
<html>
<head>
<title>Using area and JS</title>
</head>
<body>
<img src="dummy.gif" width="200" height="200"
usemap="#test" border="0">
<map name="test">
<area shape="rect" coords="0,0,100,100"
href="#" onclick="alert('Hello!!!');">
</map>
</body>
</html>
Note: I used < and > in place of brackets to avoid problems with
e-mail readers that understand HTML, ok?
I hope help you.
Sorry the poor english.
Alan Carvalho
Sao Paulo, Brazil
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA