Jump to content

Disabling context menu in UniURLFrame


Rav

Recommended Posts

21 minutes ago, donlego said:

even with local source the right clisk is still appear on firefox and chrome

     FUniUrlFrame.URL:='/files/akun.html';

Also try this:

      //FUniUrlFrame.ClientEvents.ExtEvents.Add('frameload = function frameload(sender, frame, eOpts){  sender.iframe.contentWindow.window.oncontextmenu = function(){return false}}');
      FUniUrlFrame.ClientEvents.ExtEvents.Values['frameload'] := 'function frameload(sender, frame, eOpts){  sender.iframe.contentWindow.window.oncontextmenu = function(){return false}}';

 

Link to comment
Share on other sites

 FUniUrlFrame.ClientEvents.ExtEvents.Values['frameload'] := 'function frameload(sender, frame, eOpts){  sender.iframe.contentWindow.window.oncontextmenu = function(){return false}}';

the code work well on ff and chrome , if the url is html , but if the url pdf file it appears again

how to work well both on html files and pdf file

pdf on chrome work , but not on ff

Link to comment
Share on other sites

56 minutes ago, donlego said:

  FUniUrlFrame.URL:='/files/akun.pdf';

The document is being shown by the PDF viewer installed on the client machine and you have no idea what that viewer is and there is no universal way to disable right click...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...