PDA

View Full Version : Js Help!


blackbox
12-21-2003, 06:10 PM
Right below this paragraph is my source code for the HTML coding gone wrong what i want it to do is, when the mouse goes over a link the table cell to the very right has a picture load in it but a different picture everytime.

heres the page at its current self

www.scs.smmsd.sk.ca/stoughton/links/universities.htm (http://www.scs.smmsd.sk.ca/stoughton/links/universities.htm)





<html>

<head>
<link rel="stylesheet" href="style sheets\style.css">

</heaD>

<body bgcolor="#CCD8B4">






<table cellpadding=0 cellspacing=0 border=1 height="100%" width="100%">
<TR colspan=2><TH align="right" colspan=2><img src="images/uni.bmp">

<TR><Th><a href="http://www.usask.ca" onMouseOver="document.base_image.src='images/u_OF_s.jpg';" onMouseOut="document.base_image.src='images/base_image.jpg';">University of Saskatchewan</a>

<TD rowspan="4"><img src="images/base_image.jpg" name="base_image">blah blah blah blah blah blah

<TR><Th size=9><a href="http://www.uregina.ca" onMouseOver="document.base_image.src='images/u_OF_r.jpg';" onMouseOut="document.base_image.src='images/base_image.jpg';">University of Regina</a>

<TR><Th><a href="http://www.brandonu.ca/" onMouseOver="document.base_image.src='images/u_OF_b.jpg';" onMouseOut="document.base_image.src='images/base_image.jpg';">University of Brandon</a>

<TR><Th><a href="chs-uni.htm" onMouseOver="document.base_image.src='images/canada_flag.jpg';" onMouseOut="document.base_image.src='images/base_image.jpg';">Universities in Canada</a>

</table>

</table>
</body>
</html>

ucm
12-22-2003, 01:02 AM
the problem is that the directory structure has your images at the same sub-folder level as the links directory where your page is uploaded to...

2x different ways to fix the problem:
first:
move the file-[ universities.htm ]- to the-[ http://www.scs.smmsd.sk.ca/stoughton/ ]-directory

or second:
change all the instances of the image sources from:

onMouseOver="document.base_image.src='images/u_OF_s.jpg';" onMouseOut="document.base_image.src='images/base_image.jpg';">


to


../images/


the ../ at the begining of your file locations will tell the browser to goto the preveious directory in the directory tree to look for the file in question...