Hi all,
This is my first post, Self Learned new programmer here :o)
Here's what I am having problem with:
1) OnMouseOver is working well on Chrome, but does not do anything on IE. What am I doing wrong?
2) I want to put sound on OnMouseOver. I tried using different examples, but no luck. Can you help me with the code?
Here's the full code just in case:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}</style>
<!--Fireworks CS5 Dreamweaver CS5 target. Created Fri Nov 19 23:13:18 GMT-0500 (Eastern Standard Time) 2010-->
<script language="JavaScript">
<!-- Hide from old browsers
if (navigator.appVersion.indexOf("2.") != -1){
check = false;
}
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
check = false;
}
else {
check = true;
}
image1= new Image();
image1.src = "img/index_r8_c4.gif";
image1on = new Image();
image1on.src = "img/index_r8_c4_RED.gif";
image2= new Image();
image2.src = "img/index_r4_c14.gif";
image2on = new Image();
image2on.src = "img/index_r4_c14_RED.gif";
function imageon(name) {
document[name].src = eval(name + "on.src");
}
function imageoff(name) {
document[name].src = eval(name + ".src");
}
function on(name) {
if (check == true){
imageon(name);
}
}
function off(name) {
if (check == true){
imageoff(name);
}
}
// -->
</script>
</head>
<body background="img/background.jpg">
<table border="0" cellpadding="0" cellspacing="0" width="1025" align="center">
<!-- fwtable fwsrc="main v1.png" fwpage="Page 1" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "154491994" fwnested="0" -->
<tr>
<td><a href="OurPastWork.htm" onmouseover="on('image1');" onmouseout="off('image1')">
<img name="image1" src="img/index_r8_c4.gif" width="279" height="45" border="0" id="index_r8_c4" alt="" /></a></td>
<td><a href="OurExperience.htm" onmouseover="on('image2');" onmouseout="off('image2')">
<img name="image2" src="img/index_r4_c14.gif" width="186" height="50" border="0" id="index_r4_c14" alt="" /></a></td>
</tr>
</table>
</body>
</html>
Thanks in advance