Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Back Button Shows all Records

Featured Replies

I have a DB with 27,000 real estate listings. Created with Site assistant and modified a little.

Doing a search provides a number of records in list view.

Clicking next will go to the next set of 10.

Clicking link will provide the detail page.

Clicking back in the browser shows all listings not the second set of 10 as it should.

Clicking Back botton again provides the second set of 10 as it should

If you are viewing the first set of 10 records this is not an issue. It is only after going to the next set of 10 records

Any suggestions?

Also: Periodically the price of the house will show up as zero and some times it will show up correct?:)? Periodically, not all the time. Normally after I have concurred some other issue!

Here is the formating for that field. It is the same on the detail page and works all the time?:

<?php echo nl2br ($english_format_number = number_format($record->getField('List Price', 0),0));?>

Thanks

Site link:

Link to the Site www.MLSMAX.com

  • Newbies

Hi there,

I tried the site assistant not too long ago to see how it actually handled the pagination code and found through my testing that it did not always produce accurate results when clicking next, first, last or previous to change the records being shown that you configure through the $max and $range variables.

You'll notice that in fmview.php they have their code that builds the pagination.And in your recordlist.php file you have code resembling:

[color:blue]

// get the skip and max values

$skip = $cgi->get('-skip');

if (isset($skip) === false) {

$skip = 0;

}

$max = $cgi->get('-max');

if (isset($max) === false) {

$max = 25;

}

I found that the weird errors occurred because their code for handling the $max and $range variables was storing them as $_SESSION variables. So leaving a page then returning to it would grab weird values and produce unexpected results. So I ended up rewriting the entire pagination code to not handle the variables as $_SESSION variables and passed them as $_GET variables. Then in my recordlist.php i changed it to check if the $_GET variables for min and max were set. If so, pass them to the pagination function and use them. If not, set the max and range to their default values. Thus making:

[color:blue]// get the skip and max values

$skip=$_GET['skip'];

if (isset($skip) === false) {

$skip = 0;

}

$max=$_GET['max'];

if (isset($max) === false) {

$max = 25;

}

Hope that might get you in the right direction.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.