I have a page that displays imgMain and then a bunch of thumbnails. When the user clicks on the thumbnail, I want the imgMain to change to the image the user clicked on, and the text below it to reflect the pictures description. This works fine as long as there is a valid description. If there isn't, the image is opened by itself on a blank page.
Here is the code I am using.
Works as long as there is a value...
<a href=""/db/listimages/" & oRS.Fields(21).Value & """ onclick=""document.images.imgMain.src=this.href;document.PhotoDescrip.txtPhotoDescrip.value ='"& oRS.Fields(35).Value & "';return false;""><IMG border=""0"" width=""114"" border=""0"" src=""db/listimages/" & oRS.Fields(21).Value & """></a>
Does not work and simulates there not being a value...
<a href=""/db/listimages/" & oRS.Fields(21).Value & """ onclick=""document.images.imgMain.src=this.href;document.PhotoDescrip.txtPhotoDescrip.value ='';return false;""><IMG border=""0"" width=""114"" border=""0"" src=""db/listimages/" & oRS.Fields(21).Value & """></a>
What am I doing wrong?
Here is the code I am using.
Works as long as there is a value...
<a href=""/db/listimages/" & oRS.Fields(21).Value & """ onclick=""document.images.imgMain.src=this.href;document.PhotoDescrip.txtPhotoDescrip.value ='"& oRS.Fields(35).Value & "';return false;""><IMG border=""0"" width=""114"" border=""0"" src=""db/listimages/" & oRS.Fields(21).Value & """></a>
Does not work and simulates there not being a value...
<a href=""/db/listimages/" & oRS.Fields(21).Value & """ onclick=""document.images.imgMain.src=this.href;document.PhotoDescrip.txtPhotoDescrip.value ='';return false;""><IMG border=""0"" width=""114"" border=""0"" src=""db/listimages/" & oRS.Fields(21).Value & """></a>
What am I doing wrong?