Question
Javascript function doesn't display alt text of the initial image in recordset
I have the following javascript code to display the alt text
database field of the current moused over thumbnail image. All
works fine except for the initial image's alt text. It does not
display:
PAGE EXAMPLE:
http://www.canchair.com/new_web_product_detail.asp?ProductID=198&ProductFamily=1&ProductFamilySub=10
HEAD SECTION JAVASCRIPT CODE:
<script type="text/javascript">
<!--
var currentImage;
function showBigImage( isource,bigImage,header ) {
var theImage = document.getElementById( 'largeimage' );
theImage.src = isource;
currentImage = bigImage;
document.getElementById('photoHeader').innerHTML=header;
document.getElementById( 'largeimage' ).alt=header;
}
PAGE CODE:
<a href="javascript:;">
<img src="imagescript.asp?path=<%= images.Fields.Item( "url_img" ).Value %>&Width=36" border="0" onmouseover="showBigImage( 'imagescript.asp?path=<%= images.Fields.Item( "url_img" ).Value %>&Width=250','<%= images.Fields.Item( "url_img" ).Value %>','<%=(images.Fields.Item("alt_img").Value)%>' )" alt="" /></a>
PAGE EXAMPLE:
http://www.canchair.com/new_web_product_detail.asp?ProductID=198&ProductFamily=1&ProductFamilySub=10
HEAD SECTION JAVASCRIPT CODE:
<script type="text/javascript">
<!--
var currentImage;
function showBigImage( isource,bigImage,header ) {
var theImage = document.getElementById( 'largeimage' );
theImage.src = isource;
currentImage = bigImage;
document.getElementById('photoHeader').innerHTML=header;
document.getElementById( 'largeimage' ).alt=header;
}
PAGE CODE:
<a href="javascript:;">
<img src="imagescript.asp?path=<%= images.Fields.Item( "url_img" ).Value %>&Width=36" border="0" onmouseover="showBigImage( 'imagescript.asp?path=<%= images.Fields.Item( "url_img" ).Value %>&Width=250','<%= images.Fields.Item( "url_img" ).Value %>','<%=(images.Fields.Item("alt_img").Value)%>' )" alt="" /></a>
