Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2004, 03:23 PM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default horizontal loop

is there any way I could get some records from database to loop horizontaly using div tags?

I could do it using tables but it does not work with divs.
Any ideeas.
 
Old October 13th, 2004, 09:08 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  Can u explain a bit clear wats u r requirement?


---------------
Rajani

 
Old October 14th, 2004, 01:51 AM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there.

I would like to use some sort of repeat region, but horizontally.

At the moment am using a MX extension which does the job, but it creates a table inside the div tags, which makes very dificult to control (layout).
ex. bellow:
<%
Dim rsMain
Dim rsMain_numRows

Set rsMain = Server.CreateObject("ADODB.Recordset")
rsMain.ActiveConnection = MM_interconn_STRING
rsMain.Source = "SELECT MainID, MainName, MainDescription, MainStatus FROM dbo.MainCategory WHERE MainStatus = 0 ORDER BY MainName"
rsMain.CursorType = 0
rsMain.CursorLocation = 2
rsMain.LockType = 1
rsMain.Open()

rsMain_numRows = 0
%>
<%
Dim HLooper1__numRows
HLooper1__numRows = -2
Dim HLooper1__index
HLooper1__index = 0
rsMain_numRows = rsMain_numRows + HLooper1__numRows
%>
<div id="left">

</div>
<div id="right">

</div>
<div id="main">
<div class="feature">
  <table width="600px">
    <%
Dim startrw, endrw, numberColumns, numrows
startrw = 0
endrw = HLooper1__index
numberColumns = 2
numrows = -1
while((numrows <> 0) AND (Not rsMain.EOF))
    startrw = endrw + 1
    endrw = endrw + numberColumns
 %>
  <tr align="left" valign="top">
      <%
While ((startrw <= endrw) AND (Not rsMain.EOF))
%>
      <td width="50%"><a href="#<%=rsMain("MainID")%>"> <%=(rsMain.Fields.Item("MainName").Value) & "&nbsp;" & chr(187)%> </a> </td>
      <%
    startrw = startrw + 1
    rsMain.MoveNext()
    Wend
    %>
    </tr>
    <%
 numrows=numrows-1
 Wend
 %>
  </table>
</div>
</div>
</td>
  </tr>
</table>

I would like to try getting the same results using div tags instead of table,td and tr .





Similar Threads
Thread Thread Starter Forum Replies Last Post
Horizontal gridview nedo_786 ASP.NET 2.0 Professional 5 August 10th, 2007 09:30 AM
Horizontal Alignment cc16 Access VBA 0 March 7th, 2006 06:38 PM
horizontal scrolling javascript Adam H-W Javascript 4 December 5th, 2005 07:14 AM
how to disable horizontal scrolling aliinal Javascript 1 October 27th, 2005 01:41 AM
Horizontal growth in Access Khalifeh Access 2 May 5th, 2004 12:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.