Link to home
Start Free TrialLog in
Avatar of joaquinn
joaquinn

asked on

table records split across multipe pages.

I have all my table records displaying on a single page this was fine at the start but our database has grown over time, I have seen on other sites table records split across multiple pages.  Can this be achieved using dream weaver mx?
Avatar of jay_eire
jay_eire
Flag of United States of America image

Hi  joaquinn,
Can you post your page code you are using please?
Thanks
Jay Eire
(<>..<>)
In the DreamWeaverMX interface is your application tab...
you will see an icon on this tab with a green background with arrows on it... < << >> >
click on this it will allow you to add in a record set navigation bar...this bar will let you navigate through your record set.

if you post some code i can talk you through it................
Avatar of joaquinn
joaquinn

ASKER

my code
thanks in advance
Joaquinn

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/colourdb.asp" -->
<%
Dim colorscheme
Dim colorscheme_numRows

Set colorscheme = Server.CreateObject("ADODB.Recordset")
colorscheme.ActiveConnection = MM_colourdbConnect_STRING
colorscheme.Source = "SELECT * FROM color"
colorscheme.CursorType = 0
colorscheme.CursorLocation = 2
colorscheme.LockType = 1
colorscheme.Open()

colorscheme_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
colorscheme_numRows = colorscheme_numRows + Repeat1__numRows
%>
<%
Dim MM_paramName
%>

<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<html>
<head>
<title>- Color Scheme View -</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="colourdbstyle.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="box1">
  <tr class="description">
    <td height="21" colspan="9" class="tblTitle"> - Color Scheme View -</td>
  </tr>
  <tr class="cent">
    <td height="16">Colour Description Id</td>
    <td>Colour Description</td>
    <td>Red Value</td>
    <td>Green Value</td>
    <td>Blue Value</td>
    <td>Last Updated</td>       
    <td>Inserted</td>  
      <td>action</td>
  </tr>
  <%
While ((Repeat1__numRows <> 0) AND (NOT colorscheme.EOF))
%>
  <tr class="text">
    <td height="16"><%=(colorscheme.Fields.Item("ColourDescriptionID").Value)%></td>
    <td><%=(colorscheme.Fields.Item("ColourDescription").Value)%></td>
    <td><%=(colorscheme.Fields.Item("RedValue").Value)%></td>
    <td><%=(colorscheme.Fields.Item("GreenValue").Value)%></td>
    <td><%=(colorscheme.Fields.Item("BlueValue").Value)%></td>
    <td><%=(colorscheme.Fields.Item("LastUpdated").Value)%></td>
    <td><%=(colorscheme.Fields.Item("Inserted").Value)%></td>
    <td><A HREF="Tablecolor_Update.asp?<%= MM_keepForm & MM_joinChar(MM_keepForm) & "ColourDescriptionID=" & colorscheme.Fields.Item("ColourDescriptionID").Value %>">update</A></td>
  </tr>
  <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  colorscheme.MoveNext()
Wend
%>
  <tr class="cent">
    <td height="16" colspan="8"><div align="right"></div></td>
  </tr>
</table>
</body>
</html>
<%
colorscheme.Close()
Set colorscheme = Nothing
%>
ASKER CERTIFIED SOLUTION
Avatar of jay_eire
jay_eire
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this has worked, thanks a lot.