Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Browse form with command column and auto refresh

Post Reply
bike3926
Posts: 3
Joined: Tue Jul 28, 2015 12:53 pm

Browse form with command column and auto refresh

Unread post 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
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse form with command column and auto refresh

Unread post 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
bike3926
Posts: 3
Joined: Tue Jul 28, 2015 12:53 pm

Re: Browse form with command column and auto refresh

Unread post by bike3926 »

Fabulous!

Somehow it works great!

Thanks a lot Steven.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Browse form with command column and auto refresh

Unread post by admin »

.
Post Reply