September 9, 200719 yr I’m trying to format my output from a MS Access database. I’m using ASP to retrieve the results from the database and CSS to format the output. The results contain a thumbnail image that can be enlarged. I would like to alternate these results so that the image is on the right for result 1, left for result 2, right for 3 and so forth. Currently I have the images all floated to the right. This works fine, however it’s not the desired result. A preview can been seen at http://www.bigchetti.com/camelot/larin.asp The formatting code is: <div class="maincontent"> <%Set MyConn = Server.CreateObject("ADODB.Connection") MdbFilePath = Server.MapPath("Databases/camelot.mdb") MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";" SQL_query = "SELECT * FROM ProdCamelot WHERE ProdID >=0 AND ProdCategory = 'inflatable'" Set RS = MyConn.Execute(SQL_query) WHILE NOT RS.EOF %> <h3><%=RS("ProdNme")%></h3> <a href="ProdImage/<%=RS("ProdImge")%>"><img border="0" src="ProdImage/<%=RS("ProdImge")%>" width="190" height="150" alt="" class="floatRight"></a> <p><%=RS("ProdDsc")%></p> <p>Price:<%response.write FormatCurrency(RS("ProdCost")) %></p> <% RS.MoveNext WEND %> </div> If anyone has any ideas your feedback would be appreciated. Thanks.
September 10, 200719 yr Author Problem has been solved. No need to add more divs. The problem was in the ASP code. I needed to add some variables, a counter and an IF else statement.
Create an account or sign in to comment