Search code examples
javascriptsubmitproject-open

project-open: custom JavaScript causes submit / how to prevent submit


We use the project-managment tool project-open.

Since this is open source I added a Java Script to copy Expenses (within the 'Multiple New Expense Items'). The script itself works properly.

Unfortunately after the script is finished the page automatically submits.

How can I prevent this and what could be possible sources for auto-submit?


Solution

  • Cause: Script was within form

    Solution: Put script outside of form:

    1. place script in new variable
    2. use this new variable in corresponding ADP file