Mouseover function use

liunx

Guest
I am using the mouseover function to supersize thumbnail photos in a separate table with two rows of one cell each. The attached code works correctly to change the photo in the top row of the separate table.<br />
<br />
I now wish to enhance the code to also change an associated text caption in the second row to provide a correct caption for each new photo. This code is repeted in each thumbnail row/cell of the thumbnail table.<br />
<br />
The supersize table top row is named "big" and the bottom row is named "txt".<br />
<br />
Any thoughts?<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/#<br />
ONMOUSEOVER="big.src='http://www.geocities.com/ccbebs/pics3667r/Restorationpics/FrontSuspensionAfter.jpg'"><br />
<IMG WIDTH=72 HEIGHT=64 <br />
SRC=http://www.webdeveloper.com/forum/archive/index.php/"http://www.geocities.com/ccbebs/Images/72x64smalljpgs/FrontSuspensionAfterSMALL.jpg"><!--content-->Please post your whole code with the tables etc.<!--content-->code is too long so I edited out unrelated code. Url to view all in action is: <!-- w --><a class="postlink" href="http://www.geocities.com/ccbebs/TablemakerTesting.htm">www.geocities.com/ccbebs/TablemakerTesting.htm</a><!-- w --><br />
<br />
<TABLE WIDTH="20%" BGCOLOR="#FFFFFF" ALIGN="left" CELLSPACING="1" CELLPADDING="1" BORDER="1"> <br />
<caption valign="top" align="center">Mouse Over to Supersize</caption><br />
<TR><th><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/# ONMOUSEOVER="big.src='URL FOR SUPERSIZED PHOTO HERE'"><br />
<IMG WIDTH=72 HEIGHT=64 <br />
SRC=http://www.webdeveloper.com/forum/archive/index.php/"URL FOR THUMBNAIL HERE"><br />
</TH><br />
<th><br />
</TR><br />
</TABLE><br />
<br />
<TABLE WIDTH="520" TABLE HEIGHT=310 BGCOLOR="#FFFFFF" ALIGN="right" BORDER="3"><br />
<caption valign="top" align="center">Supersized Picture</caption><br />
<br />
*cell for photo*<br />
<br />
<TR><TH><br />
<IMG WIDTH=520 HEIGHT=310 NAME="big"<br />
SRC=http://www.webdeveloper.com/forum/archive/index.php/"http://www.geocities.com/ccbebs/pics3667r/Restorationpics/ShinyStuffRemoved.jpg"><br />
</TH></TR><br />
<br />
* cell for caption *<br />
<br />
<TR><TD ALIGN=MIDDLE Font size="1"><span style="font-size:13"><font face=Verdana, Arial><br />
Still need to put appropriate caption here???</FONT><BR><br />
</TD></TR><br />
<br />
</table><br />
</body><br />
</html><!--content-->Hope that's what you want:<br />
<br />
<script language=javascript><br />
function changeText(NewTxt){<br />
obj = document.getElementById("changetext");<br />
obj.innerHTML = NewTxt;<br />
}<br />
</script><br />
<style type="text/css"><br />
<!--<br />
.changetext{<br />
font-family:arial,verdana,helvetica;<br />
font-size:10pt;<br />
color:#00003F;<br />
}<br />
--><br />
</style><br />
<TABLE WIDTH="20%" BGCOLOR="#FFFFFF" ALIGN="left" CELLSPACING="1" CELLPADDING="1" BORDER="1"><br />
<caption valign="top" align="center">Mouse Over to Supersize</caption><br />
<TR><th><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/# ONMOUSEOVER="big.src='URL FOR SUPERSIZED PHOTO HERE';changeText('That is the new text for this picture')"><br />
<IMG WIDTH=72 HEIGHT=64 SRC=http://www.webdeveloper.com/forum/archive/index.php/"URL FOR THUMBNAIL HERE"><br />
</TH><br />
<th><br />
</TR><br />
</TABLE><br />
<br />
<TABLE WIDTH="520" TABLE HEIGHT=310 BGCOLOR="#FFFFFF" ALIGN="right" BORDER="3"><br />
<caption valign="top" align="center">Supersized Picture</caption><br />
<br />
*cell for photo*<br />
<br />
<TR><TH><br />
<IMG WIDTH=520 HEIGHT=310 NAME="big" SRC=http://www.webdeveloper.com/forum/archive/index.php/"http://www.geocities.com/ccbebs/pics3667r/Restorationpics/ShinyStuffRemoved.jpg"><br />
</TH></TR><br />
<br />
* cell for caption *<br />
<br />
<TR><TD ALIGN=MIDDLE Font size="1"><div id="changetext" class="changetext"><br />
Still need to put appropriate caption here???</div><BR><br />
</TD><br />
</TR><br />
</table><!--content-->SWON you are da Man!<br />
<br />
The code you suggested worked correctly the first time. Somewhat unusual in this world. Thanks!<!--content-->
 
Back
Top