K
Koh
My rollover image effect work fine in Netscape but not in Internet
Explorer. Is there any important element or tag that I have miss out
so it is not working in Internet Explorer? Below is my code, hope
there is someone can help me. Thank you.
<html>
<head>
<title>List of Products</title>
<script language="JavaScript">
<!--
function swapImage(category)
{
document.getElementById('category').src = eval(category + ".src");
}
FrozenFoodOMO = new Image();
FrozenFoodOMO.src = "FrozenFoodOMO.gif";
FreshFoodOMO = new Image();
FreshFoodOMO.src = "FreshFoodOMO.gif";
BeveragesOMO = new Image();
BeveragesOMO.src = "BeveragesOMO.gif";
HomeHealthOMO = new Image();
HomeHealthOMO.src = "HomeHealthOMO.gif";
PetFoodOMO = new Image();
PetFoodOMO.src = "PetFoodOMO.gif";
-->
</script>
</head>
<body>
<map name="category">
<area shape="rect" coords="0,0,76,60" href="frozen_food.html"
onmouseover="swapImage('FrozenFoodOMO')" target="frame_2">
<area shape="rect" coords="94,0,170,60" href="fresh_food.html"
onmouseover="swapImage('FreshFoodOMO')" target="frame_2">
<area shape="rect" coords="192,0,302,60" href="beverages.html"
onmouseover="swapImage('BeveragesOMO')" target="frame_2">
<area shape="rect" coords="320,0,400,60" href="home_health.html"
onmouseover="swapImage('HomeHealthOMO')" target="frame_2">
<area shape="rect" coords="416,0,495,60" href="pet_food.html"
onmouseover="swapImage('PetFoodOMO')" target="frame_2">
</map>
<img src="Category.gif" id="category" border="0" usemap="#category"
style="position: absolute; top: 0px; left: 0px;">
</body>
</html>
Explorer. Is there any important element or tag that I have miss out
so it is not working in Internet Explorer? Below is my code, hope
there is someone can help me. Thank you.
<html>
<head>
<title>List of Products</title>
<script language="JavaScript">
<!--
function swapImage(category)
{
document.getElementById('category').src = eval(category + ".src");
}
FrozenFoodOMO = new Image();
FrozenFoodOMO.src = "FrozenFoodOMO.gif";
FreshFoodOMO = new Image();
FreshFoodOMO.src = "FreshFoodOMO.gif";
BeveragesOMO = new Image();
BeveragesOMO.src = "BeveragesOMO.gif";
HomeHealthOMO = new Image();
HomeHealthOMO.src = "HomeHealthOMO.gif";
PetFoodOMO = new Image();
PetFoodOMO.src = "PetFoodOMO.gif";
-->
</script>
</head>
<body>
<map name="category">
<area shape="rect" coords="0,0,76,60" href="frozen_food.html"
onmouseover="swapImage('FrozenFoodOMO')" target="frame_2">
<area shape="rect" coords="94,0,170,60" href="fresh_food.html"
onmouseover="swapImage('FreshFoodOMO')" target="frame_2">
<area shape="rect" coords="192,0,302,60" href="beverages.html"
onmouseover="swapImage('BeveragesOMO')" target="frame_2">
<area shape="rect" coords="320,0,400,60" href="home_health.html"
onmouseover="swapImage('HomeHealthOMO')" target="frame_2">
<area shape="rect" coords="416,0,495,60" href="pet_food.html"
onmouseover="swapImage('PetFoodOMO')" target="frame_2">
</map>
<img src="Category.gif" id="category" border="0" usemap="#category"
style="position: absolute; top: 0px; left: 0px;">
</body>
</html>