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

39 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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