Refresh data without user interaction on AJAX client

     

    This solution let update data without user interaction and without reload the page, it work with v11.

    Hope help.


     

    Problem:

    There may be situations where one needs to maintain a session, without user interaction and/or have automatic data refresh.
    This document provides an example of a possible solution on how to solve this request using the Ajax client.

    Solution:

    • Open the location of the Ajax client (C:\Program Files\QlikView\QlikView Server\QlikViewClients\QlikViewAjax)
    • Make a copy of the file opendoc.htm renaming it to opendoc_refresh.htm
    • Edit the copied file and add the following script in the <Head></Head> section:

                           <script>            

                                var int=self.setInterval(function(){RefreshData()},60000);            

                                 function RefreshData()           

                                        {

                                           qva.Send();           

                                        }           

                          </script>

    • Save it


    The new opendoc_refresh.htm can be applied to the AccessPoint, affecting all QlikView Documents

    or a single document.

     

    1) All AccessPoint


    To set the customized opendoc_refresh.htm to be used in AccessPoint, do the following:

    • Open QMC
    • Go to System - Setup - <QlikView Webserver instance> - AccessPoint - Accesspoint Settings
    • In Client Paths, change the path for Full Browser to /QvAjaxZfc/opendoc_refresh.htm
    • Click Apply to save changes

    2) Single document already published


    To use the customized opendoc_refresh.htm for a single QlikView document do the following:

    • Open QMC
    • Go to Documents - User Documents - <DocumentName> - Server - Availability
    • Change the path for Full Browser to /QvAjaxZfc/opendoc_refresh.htm
    • Click Apply to save changes

     

    3) Single document using the distribution task


    To apply the customized opendoc_refresh.htm using a distribution task do the following:

    • Open QMC
    • Go to Documents - Source Documents - <TaskName> - Server - Availability
    • Change the path for Full Browser to /QvAjaxZfc/opendoc_refresh.htm
    • Click Apply to save changes