Request to add new event 'On Enter' for control
In PRPC 6.2 SP1, the control behavior within a layout only provides three options:
OnClick, OnBlur, OnChange.
How can an event be configured to refresh the section and call a particular activity on press of the enter key?
This issue is resolved through the following local change:
You can implement a hidden button. When Enter is pressed then the action associated with the button would be performed. This may need your needs. The following approach can be used with a SEARCH button. Note that your section is likely to be different.
To use the Enter key to execute a button functionality, do the following steps:
- Open the section and Save As with another name to keep all the current UI.
- In the original section:
o Remove all the layouts
o Add a new section layout with the created one
o Remove the flag Auto-generated html in the HTML tab.
o Include the following code:
if(e && e.keyCode == 13)
<div onKeyPress="return checkSubmit(event)">
<button type='button' id='thebutton' style="visibility:hidden" class='MacifRechercher pzhc' data-ctl data-click='[["refresh", ["otherSection","RechercherPersonne", "LancerRecherchePersonne", "&=", "", "",":event"]]]' ><div class='pzbtn-lft' ><div class='pzbtn-rgt'><div class='pzbtn-mid' data-click='...'><img class='pzbtn-i'/> Rechercher</div></div></div></button>
-------------------- auto generated html --------------
Using 'view source' of the html you can find the code of the button that you want to execute.
Published January 31, 2016 - Updated October 8, 2020