www.webdeveloper.com
Results 1 to 6 of 6

Thread: Caption under image

  1. #1
    Join Date
    Nov 2006
    Posts
    231

    Caption under image

    .Gang,

    I am trying to include a caption under each image while LOOPING and not having one continous row of images.
    Here is the link
    Images

    Here is my code:

    Code:
    <table align="center" border=1 bgcolor="473c8b" bordercolor="473c8b">
           <tr>
            <td align="center">
         <%
           Do Until RS1.EOF
           %>
           <%If RS1("FishFile") <> "NoPic.jpg" Then%>
               <img width="250px" src="PICTURE">
           <%End IF%>
           <%If RS1("FishFile") = "NoPic.jpg" Then%>
           <img width="250px" src="NO PICTURE">
           <%End IF%>   
           <% 
             RS1.MoveNext
           Loop          
         %>
          </td>
         </tr>
       </table>

  2. #2
    Join Date
    Mar 2006
    Posts
    591
    What is the meanning of src="PICTURE"?
    Shouldn't it be <img width="250px" src="<%=RS1("FishFile")%>">?

    Maybe you could explain what you are trying to do.

  3. #3
    Join Date
    Nov 2006
    Posts
    231
    Please disregard the Img file.

    The problem I am having is the images are being displayed continously on one row.
    I would like to display 4 images per row. Below is the link.

    http://theonlinekeepsack.com/Tournament_Results1_TournamentPics_Third.asp?FishId=161

  4. #4
    Join Date
    Mar 2006
    Posts
    591
    Try this:
    Code:
    <table align="center" border=1 bgcolor="473c8b" bordercolor="473c8b">
      <tr>
         <%
          dim i
          i = 0
          Do Until RS1.EOF
          	if i = 4 then%>
    		</tr>
    		<tr>
    		<%end if%>
    		 	<td align="center">
    		   	<%If RS1("FishFile") <> "NoPic.jpg" Then%>
    			   <img width="250px" src="PICTURE">
    		   	<%End IF%>
    		   	<%If RS1("FishFile") = "NoPic.jpg" Then%>
    		   		<img width="250px" src="NO PICTURE">
    		   	<%End IF%>
    			</td>   
    		   	<% 
    			i = i + 1
    		RS1.MoveNext
    	Loop          
    		 %>
    		 </tr>
       </table>
    I made this code real quick, so there could be some mistakes within it.

  5. #5
    Join Date
    Nov 2006
    Posts
    231
    Problem Solved!!!!...Thank You TERRRORKE

  6. #6
    Join Date
    Mar 2006
    Posts
    591
    No problem.
    Anytime

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles