Page 1 of 1

Browse form with command column and auto refresh

Posted: Wed Aug 05, 2015 11:01 am
by bike3926
Hello All

I need your help to solve a problem with my "queuing system at the counter" web application. I have a only browse form with this layout:

[Image Link broken]

Each employee can call a queued number clicking on "call" column. How can I add this command to browse form?
The same form need to be refreshed every "n" seconds. The solution suggested in post "making forms auto refresh" for version 2.0 block my form. Any workaround?

Thanks for your collaboration. :)

Max

Re: Browse form with command column and auto refresh

Posted: Thu Aug 13, 2015 3:20 am
by admin
Max,

Try this (you'll need to change the form id).

:arrow: Update: Use this code for nuBuilder 4.5.

Code: Select all


     var time = new Date().getTime();

     $(document.body).bind("mousemove keypress", function(e) {
         time = new Date().getTime();
     });
     
     function refresh() {
         
         var f = nuGetHash('form_id');
         var t = nuGetHash('type');
         
         if(f != "5553dd9c4b5900a" || t != 'Browse'){  //-- the only form to refresh on
             return;
         }
         if(new Date().getTime() - time >= 6000){
             nuApplySearch();
         }else{
             setTimeout(refresh, 1000);
         }
     }

     setTimeout(refresh, 1000);

Steven

Re: Browse form with command column and auto refresh

Posted: Mon Aug 17, 2015 10:15 am
by bike3926
Fabulous!

Somehow it works great!

Thanks a lot Steven.

Re: Browse form with command column and auto refresh

Posted: Mon Aug 24, 2015 6:01 am
by admin
.