Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic imagemap - css in <area> tag

Status
Not open for further replies.

Fredde

Programmer
May 10, 2001
22
0
0
SE
I have worked a bit with ASP but have lacking skills in html and css. I'm trying to make a dynamic image map, so my question is:
Is there a way to have an image inside an <area> (for example rect when the page is loading.
/fredrik
 
Not sure I fully understand the question :(

I have never tried to use maps in JScript/DHTML, and the following may not work. The script tries to change which map is applied to the img. Like I said, it may not work :D

<img src=&quot;&quot; id=&quot;myImg&quot; usemap=&quot;#mapOne&quot;>

<map name=&quot;mapOne&quot;>
<area shape=&quot;rect&quot; coords=&quot;0,0,90,90&quot; href=&quot;</map>

<map name=&quot;mapTwo&quot;>
<area shape=&quot;rect&quot; coords=&quot;10,10,100,100&quot; href=&quot;</map>

<script>
document.getElementById('myImg').usemap='#mapTwo';
</script>

----------
I'm willing to trade custom scripts for... [see profile]
 
Ok. thanks. Got a tip that I should use the slice tool in Photoshop.

/fredrik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top