Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disable right click menu in client environment

Is it possible to disable the right-click menu and the top toolbar in the AJAX client?

If it is possible, can someone tell me where i can manage these settings?

15 Replies
Not applicable
Author

The code is not the good one... that have no effect on object right click

vgutkovsky
Master II
Master II

Sorry it's taken me a while to update this. Here is the procedure for v10:

First, 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 Files\QlikView\Server\QvClients\QvAjaxZfc\htc\default.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 Files\QlikView\Server\QvClients\QvAjaxZfc\htc\QvAjax.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.

Cheers,

Not applicable
Author

Great thank

Your Solution works on Qvs 10 SR1 (10.0.8811.6).

Don't forget to clear the browser's cache to download the new QvAjax.js

Cheers

Not applicable
Author

How do you disable it for only some files and not others?

vgutkovsky
Master II
Master II

Jeffrey,

I'm not sure this is possible...

Regards,

Vlad

Not applicable
Author

From another post, if you are using workbench generated aspx files you can add the code in this thread to the aspx page in a script tag.  Call it on load of body and the pages disappear.  I think for appending to opendoc, you lose the file selectivity...though I bet with some coding (reading a text file perhaps with qvws to disable right click) in the opendoc.

By the way, adding the code in the thread below does not require an edit to qvajax.js.  In fact, the code comes from qvajax.js.

Here is the link...http://community.qlik.com/message/152318#152318

Regards,

Jeff G