bwall
06-09-2010, 09:51 AM
Hi everyone,
I'm new here. I'm designing my own site so I'm learning code as I go, and I've run into a problem. Here's my test page (http://test.naturalfrugality.com/home%28colors%29.php). I want the image in the "Articles" box to change when I hover over the links on the right, which it does right now. (Those are actually 3 different images.) I also want the image to link to the same article as the hovered link, kind of like Yahoo's (http://www.yahoo.com) current home page. I think this is all the relevant code I'm using right now:
HEAD:
<script language="JavaScript" type="text/JavaScript">
function showT(q)
{
document.getElementById('articles').setAttribute('src','0'+q+'.jpg')
}
</script>
BODY:
<!-- Begin main articles -->
<tr><td style="border-style:none dotted none none; border-width:1px; border-color:#5CB800" align="center" width="375" rowspan="3"><img id="articles" src="00.jpg" style="border-style:none"></td>
<!-- Right titles -->
<td style="border-style:none"><a href="#" onmouseover="showT(0)">TEST: This is the title of the article you're looking for</a></td></tr>
<!-- End of 1st row -->
<tr><td style="border-style:none"><a href="#" onmouseover="showT(1)">TEST: This is the title of the article you're looking for</a></td></tr>
<tr><td style="border-style:none"><a href="#" onmouseover="showT(2)">TEST: This is the title of the article you're looking for</a></td></tr>
<!-- End main articles -->
Does anyone see the problem?
I'm new here. I'm designing my own site so I'm learning code as I go, and I've run into a problem. Here's my test page (http://test.naturalfrugality.com/home%28colors%29.php). I want the image in the "Articles" box to change when I hover over the links on the right, which it does right now. (Those are actually 3 different images.) I also want the image to link to the same article as the hovered link, kind of like Yahoo's (http://www.yahoo.com) current home page. I think this is all the relevant code I'm using right now:
HEAD:
<script language="JavaScript" type="text/JavaScript">
function showT(q)
{
document.getElementById('articles').setAttribute('src','0'+q+'.jpg')
}
</script>
BODY:
<!-- Begin main articles -->
<tr><td style="border-style:none dotted none none; border-width:1px; border-color:#5CB800" align="center" width="375" rowspan="3"><img id="articles" src="00.jpg" style="border-style:none"></td>
<!-- Right titles -->
<td style="border-style:none"><a href="#" onmouseover="showT(0)">TEST: This is the title of the article you're looking for</a></td></tr>
<!-- End of 1st row -->
<tr><td style="border-style:none"><a href="#" onmouseover="showT(1)">TEST: This is the title of the article you're looking for</a></td></tr>
<tr><td style="border-style:none"><a href="#" onmouseover="showT(2)">TEST: This is the title of the article you're looking for</a></td></tr>
<!-- End main articles -->
Does anyone see the problem?