Print Page | Close Window

Paging not working - urgent help needed

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=11742
Printed Date: 31 March 2026 at 1:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Paging not working - urgent help needed
Posted By: simflex
Subject: Paging not working - urgent help needed
Date Posted: 09 September 2004 at 8:47am

Hello all,

I have tried just about everything that I know to get the paging to work on this code, but it isn't.

I swear that when I tested this code last night on my pc, it worked fine; why itsn't working anymore, I don't know.

The culprit here is the next Block, previous block buttons.

Sorry to dump the entire code because I am not sure where it may have broken.

I am not getting any errors but it just won't.

Just a bit more info on what I am trying to do.

I select system_D from the db into recordset.

If there are more than one blockIDs associated with a particular systemID, the page indicates how many blockIDs there are and displays a message that says: processing block1 of ...(however many).

So far so go.

The problem comes when I try to go the next blockID.

Nothing happens.

Here is the code. Any help would be greatly, greatly appreciated.

I have a 1pm demo of this app today and this is really hurting right now.

 

[code]

This is page2 of the code Tarwn helped out with.

Tarwn helped with page1 of it.

This code works fine as far as doing what I wanted it to do.

However, the only issue that I have is the layout.

I have been struggling to re-arrange it but to avail.

I would like the layout to look like this:

Fullname:______________ System ID:______ Project No:____
From/At:______________ To:________ No. of Segments:____

Then the other formats can stay as they are:
So far it isn't working.

One other *little* problem is that the "Next Block" functionality is not working.

Any help would be greatly appreciated.

Sorry about the long code:


CODE
<%
' from the prior page, we get the requested SystemID:
systemID = Request("TxtsysID")
full_Name = Request("TxtprojectName")

       dim Conn,SQLstr
       Function OpenDBFConn(Path)
       Dim Conn: Set Conn = CreateObject("ADODB.Connection")
        Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                    "Data Source=" & Path & ";" & _
                    "Exten ded Properties=""DBASE IV;"";"
       Set OpenDBFConn = Conn
       End Function

      Dim DBConn
      Set DBConn = OpenDBFConn("c:\arcgis")
      'Open recordset from basins table
      Dim rs
      Set rs = DBConn.Execute("SELECT Full_Name, geo_oid FROM cline.dbf where system_ID =" & SystemID)


' How many rows are there?
BlockCount = UBound(rows,2) + 1

' okay, ready to generate form...
%>

<FORM Name="MainForm" Method=Post Action="sam2.asp" onFilt="return validateForm(this);">
<INPUT Type=HIDDEN Name="blockCount" Value="<%=blockCount%>" >
<INPUT Type=HIDDEN Name="systemID" Value="<%=systemID%>" >

<table CellPadding=5>
<tr>
    <td align="right">System ID:</td>
    <td><%=systemID%></td >
    <td align="right">Project No:</td>
    <td><input type="text" size=5 name="projID" value=""></td>
</tr>
  <tr>
    <td width="101"><font size="2" color="Black" face="Arial"><i>From/At:</i></font>< /td>
    <td><input type="text" name="TxtfromAt" size="20" maxlength="20" value=""></td>
    <td align="right"><font size="2" color="Black" face="Arial"><i>To:</i></font></td&g t;
    <td><input type="text" name="Txt_To" size="20" maxlength="20" value=""></td>
    <td align="right"><font size="2" color="Black" face="Arial"><i>No. of Segments:</i></font></td>
    <td><%=blockCount%></ td>
  </tr>
</table>
<hr>
<table CellPadding=5>
<tr>
    <td colSpan=10>
    Processing block <span ID="ID_curBlock">1</span>
    of <%=blockCount%> blocks.
    </td>
</tr>
<%
' now generate hidden divs for each row of data:
For row = 0 To UBound(rows,2)
    full_Name  = rows(COL_NAME,row)
    geo_oid   = rows(COL_BLKID,row)
%>
    <INPUT Type=Hidden Name="Row_<%=row%>" Value="<%=blockID%>">
    <INPUT Type=Hidden Name="Fullname_<%=row%>" Value="<%=fullName%>">
    <tr ID="ROWA_<%=row%>" style="display: none">
        <td>Bl ock ID:</td>
        <td>&l t;%=geo_oid%></td>
        <td>Fu llname:</td>
        <td>&l t;%=full_Name%></td>
    </tr>
    <tr ID="ROWB_<%=row%>" style="display: none">
        <td>Fr om:</td>
        <td>&l t;input type="text" size=10 name="from_<%=row%>" value=""></td>
        <td>To :</td>
        <td>&l t;input type="text" size=10 name="to_<%=row%>" value=""></td>
    </tr>
    <tr ID="ROWC_<%=row%>" style="display: none">
        <td>Di rection:</td>
        <td>&l t;input type="text" size=5 name="direction_<%=row%>" value=""></td>
        <td>To :</td>
        <td>&l t;input type="text" size=5 name="directionTo_<%=row%>" value=""></td>
    </tr>
<%
Next ' next row
%>
</TABLE>

<INPUT Type=Button Name="prior" Value="<<prior block" onFilt="goBlock(-1);">
&nbsp; &nbsp; &nbsp; &nbsp;
<INPUT Type=Submit Value="Process Everything!">
&nbsp; &nbsp; &nbsp; &nbsp;
<INPUT Type=Button Name="next" Value="next block>>" onFilt="goBlock(1);">
</FORM>

<SCRIPT Language="JavaScript">
// check one set of block info for validity
// This simple minded check just looks for blank values
// You get to fix it to do the right thing
//
function checkOne(which)
{
    var frm = document.MainForm;

    var fldFrom = frm.elements["from_" + which];
    var fldTo   = frm.elements["to_" + which];
&n




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net