PRNDL Development Studios PRNDL Development Studios - 1 month ago 10
Javascript Question

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?

Thanks.

Answer

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().

Comments