This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
HCL Notes/Domino 8.5 Forum (includes Notes Traveler)
Subject: XPage onkeypress event handler - how can I stop form submission?
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: New Features
Platform: ALL
Release: 8.5
Reproducible: Always
I am trying to set an edit box on an XPage so that, when a user presses the Enter key, the form will not be submitted, but something else will happen instead. I have javascript code that works for this purpose on legacy Domino forms, but seems to be broken on XPages.
For testing, I have a function in a client JS library called "isEnterKey" which returns true if called when the Enter key is pressed, false otherwise.
I have this simple code in the onkeypress event of an edit box:
When tested, it is correctly showing the alert "Enter key!" when (and only when) I press the Enter key in that edit box, but the form is still being submitted. How can I stop the form submission?
Feedback number SLES7RK8D3 created by ~George Umboosicheketsi on 04/29/2009
Status: Closed
Comments: See solution in this response.