_Aerospace_Eng_
10-13-2005, 12:15 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function mouseOver()
{
document.r1.src ="epee1.png"
}
function mouseOut()
{
document.r1.src =http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png"
}
//-->
</script>
</head>
<body>
<a href=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"#" onmouseover="mouseOver()" onmouseout="mouseOut()"><img src=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png" alt="" name="r1"></a>
</body>
</html>
I personally wouldn't use Javascript for a simple image rollover. I would use CSS. You might want to pass variables to your function so you don't end up having like 5 different functions that do the same thing with different names.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function changeImages(where,what){
document.getElementById(where).src=http://www.codingforums.com/archive/index.php/what;
}
//-->
</script>
</head>
<body>
<a href=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"#" onmouseover="changeImages('r1','epee1.png')" onmouseout="changeImages('r1','rapier1.png')"><img src=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png" alt="" name="r1" id="r1"></a>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function mouseOver()
{
document.r1.src ="epee1.png"
}
function mouseOut()
{
document.r1.src =http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png"
}
//-->
</script>
</head>
<body>
<a href=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"#" onmouseover="mouseOver()" onmouseout="mouseOut()"><img src=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png" alt="" name="r1"></a>
</body>
</html>
I personally wouldn't use Javascript for a simple image rollover. I would use CSS. You might want to pass variables to your function so you don't end up having like 5 different functions that do the same thing with different names.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function changeImages(where,what){
document.getElementById(where).src=http://www.codingforums.com/archive/index.php/what;
}
//-->
</script>
</head>
<body>
<a href=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"#" onmouseover="changeImages('r1','epee1.png')" onmouseout="changeImages('r1','rapier1.png')"><img src=http://www.codingforums.com/archive/index.php/http://www.codingforums.com/archive/index.php/"rapier1.png" alt="" name="r1" id="r1"></a>
</body>
</html>
