NetTalk Central

Author Topic: Javascript issues with search and sort  (Read 4975 times)

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Javascript issues with search and sort
« on: March 01, 2013, 02:32:18 AM »
I'm experiencing some trouble getting javascript search locator and sort to work correctly. It appears that with many columns (in this case 38) in the browse the locator does not appear at all (wizard-generated application with no changes at all). Of course I'm not really going to have 38 columns in the browse, but I don't seem to get any errors anywhere except that it simply doesn't work. When I reduce the number of columns to approx. screen width search/ sort appears, but it still does not always react until I manually refresh the page, i.e. JavaScript is not working like it should. What is the best way to debug this behavior? I'm using NetTalk 6.51/ Clarion 8.0.9759.
« Last Edit: March 01, 2013, 03:12:29 AM by oeb »
--------------------
Ole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Javascript issues with search and sort
« Reply #1 on: March 01, 2013, 11:05:00 PM »
Hi Ole,

it's likely a "packet size" issue. On the advanced tab I think you can make the packet size bigger.
(now that NT7 requires StringTheory it's possible to build the templates so they don't need a packet size, so in the long run this problem goes away.)


However, if you can post the example I'd be keen to take a look.

Cheers
Bruce

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Javascript issues with search and sort
« Reply #2 on: March 04, 2013, 02:19:25 AM »
Thanks. Adjusting "packet size" does not appear to have any impact though. I was able to re-create the issue with the locator box not appearing by adding some more columns to the mailboxes browse in NetTalk example 2. I have not yet been able to re-create the issue with sort not working.
--------------------
Ole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Javascript issues with search and sort
« Reply #3 on: March 04, 2013, 10:37:48 PM »
I'd need an example to get closer to the problem.

cheers
Bruce

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Javascript issues with search and sort
« Reply #4 on: April 08, 2013, 12:16:38 AM »
I've sent an example by e-mail.
--------------------
Ole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Javascript issues with search and sort
« Reply #5 on: April 25, 2013, 01:20:44 AM »
Hi Ole,

sorry for the delay.
 
a) WebServer procedure, Advanced tab, Charset – should be 'utf-8' – that's the right setting in almost all cases (and there's no 'western europe' charset.
 
b) the reason the locator is not appearing is because the TPS file you sent me only has 11 records in it. The browse is set to display "30 records per page"
which means _all_ the data is included n the page. Hence there are no navigation buttons (Next, Previous etc) and no locator.
 
Now there are ways to manipulate the locator if you want to achieve some special effect, but if you want it to behave differently then let me know and we'll
explore some of those options.
 
again, sorry for the delay in answering – it's been a bit crazy here.

cheers
Bruce

oeb

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: Javascript issues with search and sort
« Reply #6 on: April 25, 2013, 03:17:23 AM »
Thanks for looking into this.

a) I had changed this because Scandinavian characters didn't appear correctly, but realize now I should only have changed the "Store Data As" setting.

b) Changing number of records per page fixes the problem indeed (along with correcting the charset setting). Obviously the table will fill with data pretty quickly, but I think it would be confusing for the users if  the locator does not appear before a certain number of records are available - it certainly confused me :). So please let me know how to make it behave differently.

- Ole
--------------------
Ole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Javascript issues with search and sort
« Reply #7 on: April 25, 2013, 05:18:22 AM »
if you change the locator to "seach" or "contains" then you can turn on "show nothing until the user enters a locator" and the browse is then empty until a locateor is entered.

Having a locator when all the data is displayed has no meaning. So I don't think it confuses anyone.

cheers
Bruce