To disable AJAX toolbar and context menu

For security purposes and to obtain greater control over user actions, some organizations may wish to disable the QlikView AJAX toolbar that automatically opens whenever you open a document in the AJAX client. Similarly, you may want to disable to right-click context menu in AJAX. The following modifications to the code will achieve these changes; please note that the procedures are slightly different between ver. 9 and ver. 10.

 

Version 9
To disable AJAX toolbar: Open C:Program FilesQlikViewServerQvClientsQvAjaxZfchtcdefault.css, find the section ".QvToolbar" and add a display modification so that the entire section looks like this:
.QvToolbar{
   background-color:#F1F1F1;
   border-bottom:solid 1pt gray;
   height:16pt;
   display:none;
}

 

Save and close the file.

 

To disable AJAX context menu: Open the file C:Program FilesQlikViewServerQvClientsQvAjaxZfchtcQvAjax.js. Go to Line 593 where you will see the following IF statement:
if (! Qva.KeepContextMenuAlive && !polling) {
   Qva.HideContextMenu ();
}

 

Remove the IF part of the statement and the enclosing brackets, leaving only:

Qva.HideContextMenu ();

 

Save and close the file.

 

Version 10
CSS and JS files in ver. 10 are not properly formatted in the sense that there are no line breaks. To making finding the relevant sections of code easier, I recommend using this tool to format CSS and this tool to format JavaScript. Please note that the JavaScript Beautifier may present you with errors due to the size of the QVAJAX.js file; make sure to not abort execution of the script.

 

To disable AJAX toolbar: Once you have "beautified" C:Program FilesQlikViewServerQvClientsQvAjaxZfchtcdefault.css using the tool above, open the file, find the section ".QvToolbar" and change the entire section to the following:
.QvToolbar{
   background-color:#F1F1F1;
   border-bottom:solid 1pt gray;
   height:20px;
   display:none;
}

 

Save and close the file.

 

To disable AJAX context menu: Open the "beautified" file C:Program FilesQlikViewServerQvClientsQvAjaxZfchtcQvAjax.js. Replace the entire function at line 2062 with the following:
Qva.PageBinding.prototype.OnContextMenu = function (e, c, a) {
   Qva.HideContextMenu();
   return false
}

 

Save and close the file.

This entry was posted in QlikView Server. Bookmark the permalink.

2 Responses to To disable AJAX toolbar and context menu

  1. Kadir says:

    Hi Vlad,

    Thanks for your help on this. What would you recommend for IE plugin and Java? Briefly, I want to disable all right-click contextual menu regardless of which platform the user is in (Java, Ajax, IE Plugin etc). What are your thoughts?

    Best regards,

  2. Vlad Gutkovsky says:

    Kadir, I would suggest staying away from Java entirely, and disabling it as a client option. It’s very buggy and, as you know, this is no longer even offered as a client as of version 10. As far as I know, it’s not possible to disable the context menu for the Plugin. However, there are a bunch of hidden registry tweaks (known only to QlikTech) that offer additional customizations. For example, see this post on QlikCommunity: http://community.qlikview.com/message/53097

    Best regards,
    Vlad

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify via email when new comments are added

Blog Home
Archives