Jump to content

Imagemap


nworst

Recommended Posts

I'm planning to make an imagemap, which should look a bit like this: (but then ofcourse with different pictures)imagemap.pngI had the following script in mind: (with help of w3schools)

<html><head> <script type="text/javascript">	function writeText(txt)	{	document.getElementById("desc").innerHTML=txt;	} </script></head><body><img src="*.png" width="300" 	  height="300" alt="..." usemap="#imagemap"	  onMouseout="writeText('')" /> <map name="imagemap">  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part I.')"   href="*.htm" target="_blank" alt="..." />  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part II.')"   href="*.htm" target="_blank" alt="..." />  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part III.')"   href="*.htm" target="_blank" alt="..." /> </map><p id="desc"></p></body></html>

But my question: How do you know what the coordinates are?Thanks

Link to comment
Share on other sites

I'm planning to make an imagemap, which should look a bit like this: (but then ofcourse with different pictures)imagemap.pngI had the following script in mind: (with help of w3schools)
<html><head> <script type="text/javascript">	function writeText(txt)	{	document.getElementById("desc").innerHTML=txt;	} </script></head><body><img src="*.png" width="300" 	  height="300" alt="..." usemap="#imagemap"	  onMouseout="writeText('')" /> <map name="imagemap">  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part I.')"   href="*.htm" target="_blank" alt="..." />  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part II.')"   href="*.htm" target="_blank" alt="..." />  <area shape="rect" coords="?,?,?,?"   onMouseOver="writeText('This is part III.')"   href="*.htm" target="_blank" alt="..." /> </map><p id="desc"></p></body></html>

But my question: How do you know what the coordinates are?Thanks

Zoom in on the image and count how many pixels there are to each coordinate you want.Alternatively, use a measuring tool such as the one that comes in Adobe Photoshop.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...