· Jun 7, 2019

Issue with shortcuts on ZEN Page with PDF document

Hello Cache Developers!  The purpose for this post is to outline a coding challenge that I have encountered when trying to use shortcuts (i.e. CTRL+G) within a ZEN application.   Allow me to provide a summarized background:

Our application has a ZEN page (call it the PPL page) with a tablepane that displays a list of records.   This page also has an iFrame (#1)

  • The tablepane allows the user to select one or more rows from the table and will click one of the appropriate buttons on that page to invoke a looping process that allows the user to work each of the selected records one-by-one.  
  • Based on the button that is clicked, the iFrame (#1) will be loaded with another ZEN page (APDR page) that is a navigation wrapper page with a navigation button bar and a processing button bar and an iFrame (#2) that contains a PDF document associated with the first selected record.
  • The user reviews content in the PDF and uses the processing button bar to complete workflow actions.
  • The navigation button bar is used to advance to the next, previous, first, or last selected record.  
  • As the user navigates from one selected record to another, the iFrame (#2) is loaded with a PDF that is associated with the selected record being processed.  As soon as the PDF is loaded, the PDF document has the focus.

A few additional things to note at this point.   The users are using Internet Explorer for the web browser that has the Adobe Reader plugin that displays the PDF documents.

All of that being said, here is my dilemma:  The user would like to be able to use keyboard shortcuts to move from one selected record to the next without having to use the mouse to click the [Next] or [Previous] buttons.  I have tried to add shortcuts to my ZEN page, but the Adobe Reader plugin interprets those keyboard shortcuts instead of the ZEN page (my application).   The shortcuts will work IF the user mouse clicks on the button bar associated with my ZEN page and then uses the keyboard shortcut.  But that defeats the purpose of having the keyboard shortcuts if the user must use the mouse to click somewhere on the ZEN page outside of the PDF document.

Does anyone have any ideas or suggestions about how to be able to use shortcuts that the Adobe Reader plugin will not intercept?

Much thanks in advance for your time and feedback.

Happy Coding and Go Team!

Discussion (1)1
Log in or sign up to continue

If I understand correctly, the main problem is that the tablepane loses the focus once the PDF is loaded. So the idea is to give it back. 

 - First of all, you need to set the tablepane to work with the arrow keys (probably you already have it, if not this is the first thing to do). 

- Then you need to monitor the PDF iframe, and once it is loaded, change the focus to the tablepane in the parent page. 

iframe.attachEvent("onload", function(){ }) is the way to do iframe onload events in IE, this function should set the focus in the tablepane. As an example the function maybe something like: 

function myFunction() { 

I hope this helps!