My webpage of discussion contains a javascript powered image gallery
of small thumbnail images that when moused-over, display a larger
image that corresponds to the current moused-over thumbnail. An image
caption (whose value is populated by my alt_img database field), also
changes according to the current moused-over thumbnail image. All
functions fine...except...for the initial value for the alt_jmg
database field. The caption text for this initial value does not
display once the thumbnails are moused-over.
When zooming in on the html code that is generated as a result of the
repeated region of the thumbnail images and caption text database
fields, you notice that the alt_img database field is missing. This
should explain why it does not show up on the page.
The question is why only the initial recordset value is missing? What
is preventing the javascript to work properly only for this initial
value?
The issue can be viewed on the following webpage:
http://www.canchair.com/new_web_prod...ctFamilySub=10
NOW HERE'S THE CODE:
The following head section javascript code contains the function
showBigImage( isource,bigImage,header ) function call of discussion:
JAVASCRIPT HEAD SECTION CODE:
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;
JAVASCRIPT PAGE CODE:
<td height=36 valign="middle" class="small_img"
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)%>' )"><img
src="imagescript.asp?path=<%= images.Fields.Item( "url_img" ).Value
%>&width=36" border="0" </td>
RENDERED REPEAT REGION RECORDSET CODE - THIS CODE ILLUSTRATES THE
ISSUE OF DISCUSSION:
The following rendered looped recordset code illustrates how the
"header" parameter of this showBigImage( isource,bigImage,header )
function call does not render ONLY FOR THE FIRST RECORD OF THE
RECORDSET as it is blank. This "header" value is pulled from the
alt_img database field:
<td height=36 valign="middle"
class="small_img" onmouseover="showBigImage( 'imagescript.asp?
path=images/portable_stage.jpg&width=250','images/
portable_stage.jpg','' )"<img src="imagescript.asp?path=images/
portable_stage.jpg&width=36" border="0" alt="" </td>
<td height=36 valign="middle"
class="small_img" onmouseover="showBigImage( 'imagescript.asp?
path=images/seated_riserset.jpg&width=250','images/
seated_riserset.jpg','Portable stage configuration using 9 units of
the 3 ft x 8 ft platforms in 3 different heights' )"<img
src="imagescript.asp?path=images/seated_riserset.jpg&width=36"
border="0" alt="" </td>
<td height=36 valign="middle"
class="small_img" onmouseover="showBigImage( 'imagescript.asp?
path=images/Stageset.jpg&width=250','images/Stageset.jpg','Portable
stage configuration using 16 units of the 4 ft x 8 ft platforms' )">
<img src="imagescript.asp?path=images/Stageset.jpg&width=36"
border="0" alt="" </td>
<td height=36 valign="middle"
class="small_img" onmouseover="showBigImage( 'imagescript.asp?
path=images/Runset.jpg&width=250','images/Runset.jpg','Portable stage
runset configuration' )"<img src="imagescript.asp?path=images/
Runset.jpg&width=36" border="0" alt="" </td>