HTML javascript, HTML javascript image map |
HTML javascript, HTML javascript image map |
Roosevelt28 |
Oct 9 2007, 06:31 PM
Post
#1
|
Newbie Group: Members Posts: 15 Joined: 9-October 07 Member No.: 4,022 |
this source code shows text in a onMouseOver event
<html> <head> </head> <script type="text/javascript"> function show(txt) { document.getElementById("show1").innerHTML=txt } </script><body> <img src="pic\untitled-1.jpg" usemap="#planet" style="float:left"> <map id="planet" name="planet"> <area shape="circle" coords="576,146,6" alt="pluto" nohref onMouseOver="show(' SOME TEXT DESCRIBING PLUTO')" onMouseOut="show(' ')"> <area shape="circle" coords="503,162,18" alt="neptune" nohref> <area shape="circle" coords="400,171,22" alt="uranus" nohref> <area shape="circle" coords="318,187,24" alt="saturn" nohref> <area shape="circle" coords="258,188,45" alt="jupiter" nohref> <area shape="circle" coords="197,194,13" alt="mars" nohref> <area shape="circle" coords="151,198,15" alt="earth" nohref> <area shape="circle" coords="113,201,18" alt="venus" nohref> <area shape="circle" coords="75,211,8" alt="mercury" nohref> <area shape="poly" coords="0,70,28,144,38,193,28,248,0,277" alt="sun" nohref> </map> <p Id="show1"></p> </body> </html> Question is: how can I display an image rather than displaying a TEXT? you can e-mail me at pios05@yahoo.com |
Roosevelt28 |
Oct 11 2007, 10:11 AM
Post
#2
|
Newbie Group: Members Posts: 15 Joined: 9-October 07 Member No.: 4,022 |
I got the answer to my question LOL
if anyone interested to know how feel free to ask.. willing to help here. |
Darin McGrew |
Oct 11 2007, 10:19 AM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
So what did you figure out?
|
Roosevelt28 |
Oct 12 2007, 06:41 AM
Post
#4
|
Newbie Group: Members Posts: 15 Joined: 9-October 07 Member No.: 4,022 |
hmm just wondering.. what do you do for living?
hmm this is how you do it... this is for the head section: <script type="text/javascript"> function gettip(image) { document.getElementById('show2').innerHTML="<img src='" + image + "'height=100 width=100 />" } function reset() { document.getElementById('show2').innerHTML=" " } </script> this is for the body section: IMAGE MAP <img src="pic\untitled-1.jpg" usemap="#planet" style="float:left;margin-top:7%"> <map id="planet" name="planet"> <area shape="circle" coords="576,146,6" alt="pluto" nohref onmouseover="gettip(' s.jpg ')" onMouseOut="reset();show(' ')"> ----------- <p id="show2"></p> hope you understand if you got a question, anything.. I'll try my best to help... |
Lo-Fi Version | Time is now: 28th March 2024 - 02:57 PM |