View Single Post
  #1 (permalink)  
Old April 7th, 2006, 01:16 PM
drea drea is offline
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'loop' without 'do'

Hi,

I am trying to put images side by side on a webpage. However, with my code I get a 'loop' without 'do' error. What do I need to add to this code so that my images appear next to each other? It is for this page: http://scarscare.org/lookatusnow.asp





<%

 SQL = "SELECT * from lookatusnow ORDER BY [date] DESC"
 Set objRS = objConn.Execute(SQL)

%>
                    <table width="600" height="100%" border="0" align="center" cellpadding="0" cellspacing="10">
                      <tr>
                        <td colspan="2" align="left" valign="top"><p align="left"><span class="redHeading16">Look At Us Now! </span><span class="bodyblack1"><br>
                            </span></p></td>
                      </tr>
                      <tr align="left">
                        <td colspan="2" valign="top"><p>Click the images to see how they are doing now! </p>

      <% DO WHILE NOT objRS.EOF %>
                          <p><strong>
        <% IF objRS("doc") <> "" THEN %><a href="<%=objRS("doc")%>" target="_blank"><% END IF %><%=objRS("title")%> (<%=objRS("date")%>) <br>
        <img src="<%=objRS("image")%>" width="250" height="250" border="0"><% IF objRS("doc") <> "" THEN %></a><% END IF %>
                                </strong></p>

      <% objRS.MoveNext %>
      <% LOOP %>

        </td>
                      </tr>




                    </table>



Thanks in advance for any help that you can provide!

Andrea
Reply With Quote