Skip to main content
Known Participant
June 10, 2010
Question

Recordset Navigation Bar Issue

  • June 10, 2010
  • 3 replies
  • 759 views

I have an index page with a dynamic drop-down menu where you select the state. Then you hit submit and it goes to my results page where a dynamic table displays all record from my table with the selected state. I finally got that all to work just fine.

Here's the problem: I have a Recordset Navigation Bar system set up on my results  page, and can get the first page of results to work correctly, but the navigation  system doesn't work.  When you page Next, the page doesn't populate, and  you cannot get back to the original page or either of the first or last  pages.

Here's the code that DW generated for the Recordset Navigation Bar if it helps:

<table border="0">
  <tr>
    <td><?php if ($pageNum_rsFiberIntake > 0) { // Show if not first page ?>
          <a href="<?php printf("%s?pageNum_rsFiberIntake=%d%s", $currentPage, 0, $queryString_rsFiberIntake); ?>">First</a>
          <?php } // Show if not first page ?>
    </td>
    <td><?php if ($pageNum_rsFiberIntake > 0) { // Show if not first page ?>
          <a href="<?php printf("%s?pageNum_rsFiberIntake=%d%s", $currentPage, max(0, $pageNum_rsFiberIntake - 1), $queryString_rsFiberIntake); ?>">Previous</a>
          <?php } // Show if not first page ?>
    </td>
    <td><?php if ($pageNum_rsFiberIntake < $totalPages_rsFiberIntake) { // Show if not last page ?>
          <a href="<?php printf("%s?pageNum_rsFiberIntake=%d%s", $currentPage, min($totalPages_rsFiberIntake, $pageNum_rsFiberIntake + 1), $queryString_rsFiberIntake); ?>">Next</a>
          <?php } // Show if not last page ?>
    </td>
    <td><?php if ($pageNum_rsFiberIntake < $totalPages_rsFiberIntake) { // Show if not last page ?>
          <a href="<?php printf("%s?pageNum_rsFiberIntake=%d%s", $currentPage, $totalPages_rsFiberIntake, $queryString_rsFiberIntake); ?>">Last</a>
          <?php } // Show if not last page ?>
    </td>
  </tr>
</table>

Any suggestions would be greatly appreciated. Thanks!

This topic has been closed for replies.

3 replies

Known Participant
June 15, 2010

I finally figured this out. So I'll post my solution incase anyone stumbles upon this thread.

How to fix the problem:

1. Delete the recordset navigation bar.

2. Select the form (in this case on my index.php page), and in the properties panel switch the method from POST to GET.

This puts the form's information into the URL. ex: http://10.100.136.29/csqConnect/results.php?state=CA&submit=Submit

3. Go to your results page where you have your table displaying your dynamic data and in the Server Behaviors panel double-click the recordset that you are pulling your info from.

4. Make sure your recordset name, db connection, and table are correct then select your filter field from the filter menu. Select your operater (in my case '=') Select 'URL parameter' from the menu then type the exact name of your field. (For some reason DW generated 'State' here, but I have to retype it as 'state' for this to work.) Click OK.

5. Put back you recordset navigation bar.

Done.

Known Participant
June 15, 2010

See below.

Known Participant
June 14, 2010

Forgot to add that I'm working in DW CS3.

Any suggestions?

Known Participant
June 15, 2010

Does anyone need any more information regarding this question? I'm running WAMP if that helps . . .

I'm pretty bummed, that I can't figure this out, it's killing me.

Known Participant
June 15, 2010

I've been searching and found an old thread that may give some insight into the problem. I still cna't figure it out,

seeing as I'm not experienced and don't fully understand the code behind all this, but perhaps this thread oculd help us figure it out:

http://forums.adobe.com/message/2755234

She says at the end: "i needed to keep re-passing the category variable to successive pages of  the recordset. my mistake was in believing that it was one page, with a  dynamic recordset which was the only thing changing. in actual fact,  every time you click on the "next" button on the navigation bar, it  links to a new iteraton of the page. so i just went into the code for  the navbar, and at the end of the printf statement, tacked on  "&cat=%d" and at the end added $CT as the source for the %d  variable. now it works like a charm."

It sounds like a similair problem. Does anyone have ideas on what I could add to my code?

Any suggestions would be greatly appreciated.