chaseinchrist
12-21-2005, 06:07 PM
I am having trouble with making an image-over, or mouse-over, or what ever you call it.
Here's what I am typing:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!-- Hide the script from old browsers --
img0_on = new Image(100,100);
img0_on.src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif";
img0_off = new Image(100,100);
img0_off.src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif";
function over_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_on.src");
}
function off_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_off.src");
}
// --End Hiding Here -->
</script>
<title>
</title>
</head>
<body>
<a href="http://www.freewebs.com/teenschristianliving" onmouseover="over_image('http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif');" onmouseout="off_image('http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif')"> <img src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif" border="0" name="img0" width="100" hight="100"> </a>
</body>
</html>
Can anyone help?
Here's what I am typing:
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!-- Hide the script from old browsers --
img0_on = new Image(100,100);
img0_on.src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif";
img0_off = new Image(100,100);
img0_off.src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif";
function over_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_on.src");
}
function off_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_off.src");
}
// --End Hiding Here -->
</script>
<title>
</title>
</head>
<body>
<a href="http://www.freewebs.com/teenschristianliving" onmouseover="over_image('http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif');" onmouseout="off_image('http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif')"> <img src="http://i2.photobucket.com/albums/y43/GregoryChase/photobucketpic2.gif" border="0" name="img0" width="100" hight="100"> </a>
</body>
</html>
Can anyone help?