Search code examples
javascriptdom-eventslotus-domino

Handle form submission event with Javascript, avoid "Form Processed"


I have a text box and Javascript attached to a button. I have the onkeyup event linked to the same method as the button.

I want to be able to type in the text box and hit enter and execute my Javascript. Instead, lotus thinks I want to submit a form, hijacks what I am doing, and returns "Form Processed". It is very obnoxious.

What can I do to avoid Lotus doing this?


Solution

  • If you don't ever want to do a standard submit to Domino, then use a Page design element instead of a Form.

    But if you do want to submit a standard Domino form, you can set the onSubmit event on the form to false in order to stop the browser from doing automatic submits. But you won't be able to use a simple submit button if you do that. You will have to explicitly call document.forms[0].submit().