Skip to main content
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 Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)


SOLVED: use "thisEvent.preventDefault()"

I had a brainwave this morning: XPage client-side JS uses Dojo, so documentation on the Dojo website might relate to the global XSP object in XPages.

On the Dojo website, I found that Dojo events use a special event class, which contains a method called "preventDefault".

My onkeypress event now looks like this:
      if (thisEvent.keyCode==13) {
      thisEvent.preventDefault();
      // And some other code for an alternative action...
      }

Wonder of wonders, pressing Enter in that field no longer submits the form.


Feedback response number SLES7RM2YJ created by ~George Umboosicheketsi on 05/01/2009

XPage onkeypress event handler - ho... (~Bella Zenfooma... 29.Apr.09)
. . SOLVED: use "thisEvent.preventDefau... (~Bella Zenfooma... 1.May.09)
. . Does 'No Data Validation' help? (~Joan Zektoomar... 29.Apr.09)
. . . . 'No data validation' makes no diffe... (~Bella Zenfooma... 30.Apr.09)
. . Pressing Enter on a Edit box should... (~Joan Zektoomar... 30.Apr.09)
. . . . The submission is not caused by an ... (~George Umboosi... 30.Apr.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS