Jump to content

How To Trap An ESCAPE Key Pressed Within The TUniURLFrame?


Recommended Posts

Posted

How do I check if the ESCAPE key had been pressed within the TUniURLFrame and handle it?

The following code that works in TUniPDFFrame does not work here.

TUniUrlFrame1.JSInterface.JSCode(#1'.iframe.contentDocument.addEventListener("keydown", function(e){ajaxRequest('+ Self.WebForm.JSForm.JSName +', "keydown", ["key="+e.keyCode])});')

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1534)
 

 

Posted
7 minutes ago, Sherzod said:

Hello,

Try

top.ajaxRequest

instead of ajaxRequest

I changed my code to below but there is no effect.

TUniURLFrame1.JSInterface.JSCode(#1'.iframe.contentDocument.addEventListener("keydown", function(e){top.ajaxRequest('+ Self.WebForm.JSForm.JSName +', "keydown", ["key="+e.keyCode])});')

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...