Jump to content
  • 0

Can I navigate through my records in the Details page by clicking the arrow keys on my keyboard instead of pressing the next and previous buttons on the page?


cordova
 Share

Question

2 answers to this question

Recommended Posts

  • 0

Hi,

 

Yes, you could do this using JavaScript.

 

On your Report DataPage, go to the Configure Details Page Fields and add a Header and footer. Disable the HTML editor for the footer and paste the following:

 

<script>

var prev = document.querySelector("a[data-cb-name='JumpToPrev']");
var next = document.querySelector("a[data-cb-name='JumpToNext']");

 document.onkeydown = function (event) {
      switch (event.keyCode) {
     


         case 37:
            //left arrow
            prev.click();
            break;
    
         case 39:
            //right arrow
            next.click();
            break;
         


      }
   };

</script>

 

Link to comment
Share on other sites

  • 0

Just wanna add, you can also apply this to the results page, just copy the entire thing to the footer of the Configure Results Field screen when editing your DataPage.

 

You can also add key events for the first and last page of the results by adding these variables:

var first = document.querySelector("a[data-cb-name='JumpToFirst']");
var last = document.querySelector("a[data-cb-name='JumpToLast']");

 

and to reference them on the switch case:

   case 33:
             //page up
            first.click();
            break;

            case 34:
             //page down
            last.click();
            break; 

 

(for the example above i used the page up to go to the first page, and the page down to go the last page)
 

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

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

Loading...
 Share

×
×
  • Create New...