Javascript is added to forms to assist in replacing features that do not exist natively in the product, while the form is being filled out. However, anytime I add javascript to a form, if the person is viewing a historical submission, when they open the submission it executes the javascript that was part of the form.
This is causing a host of problems, because the javascript was designed to work with fields on the form, but they are only looking at an image of the form, the fields are gone.
So any line of code that says something like $('.myField select').val() is going to return null and the script is going to fail causing adverse side effects where part of your code successfully runs and the other part does not.
There is no reason to run javascript here, since they are only looking at what was submitted and do not need to be making any changes to the data.
If we re-assign the form, then it makes sense for javascript to run again, because they have loaded the form up again for editing purposes and the script will be able to access the fields it expects to find on the form.