Gyrogeorge
05-25-2003, 07:30 AM
I am new to javascript so my problem is basic but I have to ask anyway. I wroe out a page with some image rollover links in a table at the side of the page. They work fine on my hard drive but online two of the images arent there at all, none of the rollovers work and two of the links dont work. If anyone doesnt mind checking it this is the part of the code thats causing problems,
<head> <script language="javascript">
function switchem(whichImage,whichPic) {document.images[whichImage].src=whichPic;}
function switchback(whichImage,whichPic) {document.images[whichImage].src=whichPic;}
</script> </head>
<body>
<table width="10%" bordercolor="red" border="2" align="left">
<tr><td><a href="frontpage.html" onMouseOver="switchem('pic1','images/homebtn2.jpg')" onMouseOut="switchback('pic1','images/homebtn1.jpg')"><img src="images/homebtn1.jpg" name="pic1" title="Home of the grave and the land of the gee"></a></td></tr>
<tr><td><a href="news.html" onMouseOver="switchem('pic4','images/newsbtn2.jpg')" onMouseOut="switchback('pic4','images/newsbtn1.jpg')"><img src="images/newsbtn1.jpg" name="pic4"></a></td></tr>
<tr><td><a href="articles.html" onMouseOver="switchem('pic2','images/articlesbtn2.jpg')" onMouseOut="switchback('pic2','images/articlesbtn1.jpg')"><img src="images/articlesbtn1.jpg" name="pic2"></a></td></tr>
<tr><td><a href="photography.html" onMouseOver="switchem('pic3','images/photosbutton2.jpg')" onMouseOut="switchback('pic3','images/photosbutton1.jpg')"><img src="images/photosbutton1.jpg" name="pic3"></a></td></tr>
<tr><td><a href="links.html" onMouseOver="switchem('pic5','images/linksbtn2.jpg')" onMouseOut="switchback('pic5','images/linksbtn1.jpg')"><img src="images/linksbtn1.jpg" name="pic5"></a></td></tr>
</table>
If anyone knows what the problem is Id really appreciate some help, thanks.
<head> <script language="javascript">
function switchem(whichImage,whichPic) {document.images[whichImage].src=whichPic;}
function switchback(whichImage,whichPic) {document.images[whichImage].src=whichPic;}
</script> </head>
<body>
<table width="10%" bordercolor="red" border="2" align="left">
<tr><td><a href="frontpage.html" onMouseOver="switchem('pic1','images/homebtn2.jpg')" onMouseOut="switchback('pic1','images/homebtn1.jpg')"><img src="images/homebtn1.jpg" name="pic1" title="Home of the grave and the land of the gee"></a></td></tr>
<tr><td><a href="news.html" onMouseOver="switchem('pic4','images/newsbtn2.jpg')" onMouseOut="switchback('pic4','images/newsbtn1.jpg')"><img src="images/newsbtn1.jpg" name="pic4"></a></td></tr>
<tr><td><a href="articles.html" onMouseOver="switchem('pic2','images/articlesbtn2.jpg')" onMouseOut="switchback('pic2','images/articlesbtn1.jpg')"><img src="images/articlesbtn1.jpg" name="pic2"></a></td></tr>
<tr><td><a href="photography.html" onMouseOver="switchem('pic3','images/photosbutton2.jpg')" onMouseOut="switchback('pic3','images/photosbutton1.jpg')"><img src="images/photosbutton1.jpg" name="pic3"></a></td></tr>
<tr><td><a href="links.html" onMouseOver="switchem('pic5','images/linksbtn2.jpg')" onMouseOut="switchback('pic5','images/linksbtn1.jpg')"><img src="images/linksbtn1.jpg" name="pic5"></a></td></tr>
</table>
If anyone knows what the problem is Id really appreciate some help, thanks.