G
GCeaser
I have the following page. It works fine in IE 6.0 but when I load it
in FireFox and place my mouse over the head of the image - nothing
happens. Any ideas? (Very short) -- The javascript is supposed to
move and show the div tag.
Thanks
George
----------- start html -------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>UTest Script</title>
</head>
<body>
<img id="bodyimage" alt="Image of Body" usemap="#bodymap"
src="images/Body.gif" width="239px" height="388px" />
<map id="bodymap">
<area id="head" shape="circle" onmouseover="showmessage(event,
this);" coords="85,73,70" alt="Head" />
<area shape="rect" coords="10,140,200,200"
onmouseover="showmessage(event, this);" alt="Asthma<br/>Bronchitis<br
/>RSV<br/>Pneumonia" />
<area shape="rect" coords="2,200,200,270"
alt="Stomachaches<br/>Vomiting and Diarrhea<br/>Bladder/Kidney
Infections"/>
<area shape="rect" coords="20,270,239, 388"
alt="Rashes<br/>Eczema<br/>Cuts, Scrapes, Stitches<br />Sprains,
Strains" />
</map>
<div id="stuff" style="visibility: hidden"> this is a test - this
is only a test</div>
<script type="text/javascript">
function showmessage(e, imagearea){
if (imagearea.id == "head")
{
stuff.style.left= (e.screenX + 120) + "px";
stuff.style.position= "absolute";
stuff.style.top = (e.screenY - 150 ) + "px";
stuff.style.visibility = "visible";
}
return true;
}
</script>
</body>
</html>
-------end html -------
--- Image to use ----
link to image:
http://www.pediatricsfirst.com/images/body.gif
in FireFox and place my mouse over the head of the image - nothing
happens. Any ideas? (Very short) -- The javascript is supposed to
move and show the div tag.
Thanks
George
----------- start html -------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>UTest Script</title>
</head>
<body>
<img id="bodyimage" alt="Image of Body" usemap="#bodymap"
src="images/Body.gif" width="239px" height="388px" />
<map id="bodymap">
<area id="head" shape="circle" onmouseover="showmessage(event,
this);" coords="85,73,70" alt="Head" />
<area shape="rect" coords="10,140,200,200"
onmouseover="showmessage(event, this);" alt="Asthma<br/>Bronchitis<br
/>RSV<br/>Pneumonia" />
<area shape="rect" coords="2,200,200,270"
alt="Stomachaches<br/>Vomiting and Diarrhea<br/>Bladder/Kidney
Infections"/>
<area shape="rect" coords="20,270,239, 388"
alt="Rashes<br/>Eczema<br/>Cuts, Scrapes, Stitches<br />Sprains,
Strains" />
</map>
<div id="stuff" style="visibility: hidden"> this is a test - this
is only a test</div>
<script type="text/javascript">
function showmessage(e, imagearea){
if (imagearea.id == "head")
{
stuff.style.left= (e.screenX + 120) + "px";
stuff.style.position= "absolute";
stuff.style.top = (e.screenY - 150 ) + "px";
stuff.style.visibility = "visible";
}
return true;
}
</script>
</body>
</html>
-------end html -------
--- Image to use ----
link to image:
http://www.pediatricsfirst.com/images/body.gif