NetTalk Central

Author Topic: Next and Previous buttons not working in the browse  (Read 5811 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Next and Previous buttons not working in the browse
« on: November 07, 2007, 02:47:06 AM »
I've got kind of a strange problem I wondered if anyone might give some insight about (I'm wondering if it's a bug actually). On the site: www.insiderweek.com the next and previous buttons beneath the browse  don't work until you hit the reload button or go to another page and come back. I don't think I've done anything unusual with the code. I am using Page loading rather than File loading.

Another question: Bruce suggests you shouldn't be using page loading, but File loading grays out the number of records per page. Is there a way to specify the number of records with File loading so that it doesn't display all the records at once? Using 4.29. Thanks all! MikeG
Mike Grigsby
Credify Systems
Central Oregon, USA

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Next and Previous buttons not working in the browse
« Reply #1 on: November 07, 2007, 11:48:30 AM »
I'm not sure if this is a BUG or not, but I figured it out. If I send this packet back:

packet = '<h2><font color="#999999" face="Arial" size="2">Asset Value Totals, Variances, and Warnings</font></h2>' & |
     '<table border="0" width="642" cellspacing="0" cellpadding="0">&nbsp;' & |
     '<tr><td width="442" bgcolor="#EAEAEA"></td></tr>' & |
        '<td width="100" align="center" bgcolor="#EAEAEA"><font face="Arial" size="2" color="#000080"><strong>Home</strong></font></td>' & |
        '<td width="100" align="center" bgcolor="#EAEAEA"><font face="Arial" size="2" color="#000080"><strong>Autos</strong></font></td>' & |
      '</tr>' & |
     '</table>'

... it chokes. It formats the table, but the browse navigation buttons don't work. If I remove the &nbsp; from the first cell, it works again. Not sure what the answer would be if you needed the space in there, but luckily I can use the table without it.

« Last Edit: November 07, 2007, 12:45:24 PM by Mike Grigsby »
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Next and Previous buttons not working in the browse
« Reply #2 on: November 20, 2007, 05:26:30 AM »
Hi Mike,

Not sure where I advised against Page-Loading - I usually advise _for_ page loading. I use it all the time myself.

Navigation usually breaks when what you send back is not valid XHTML. In version 4.30 there's a lot more "behind the scenes" to protect you from invalid XHTML, but if you put your own XHTML into the browse, and it is invlaid, then the navigation will fail.

Cheers
Bruce

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Next and Previous buttons not working in the browse
« Reply #3 on: November 27, 2007, 12:42:02 PM »
Bruce, perhaps I misread this, but in the NetTalk docs, the Web Server FAQ W11 ends with "things can get seriously interesting" if using page loading.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Next and Previous buttons not working in the browse
« Reply #4 on: November 28, 2007, 03:11:06 AM »
Hi Mike,

I need to update that FAQ a bit - it's a bit out of date.

The short answer is to use Session Values, not Values - then the filter keeps working ok.
I think I've updated the example called DropFilter to use the correct technique...

Cheers
Bruce