Jump to content

Imagemap


nworst
 Share

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

Edited by nworst
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...