The difference is that the straight JavaScript submit() does not invoke the
DocumentContext of the document as served. It does use the form, yes, but it
does not look at the form's "served state" -- what was hidden, etc. In fact,
the form that is actually submitted to the database using a submit() action
does not have to exist as a usable HTML form in the database, and therefore may
not have a "served state". "Use the form" versus "use the form as served" may
seem like a subtle distinction to the developer, but it makes a huge difference
to the internals of the machine. Domino cannot assume that a document was
served using a particular form unless that form is also fed in the
Request_Content of the submission -- it could have been served using an
alternate form (via a form formula), or, for that matter, by a pure HTML form
created by an agent or servlet.
The difference is that the straight JavaScript submit() does not invoke the DocumentContext of the document as served. It does use the form, yes, but it does not look at the form's "served state" -- what was hidden, etc. In fact, the form that is actually submitted to the database using a submit() action does not have to exist as a usable HTML form in the database, and therefore may not have a "served state". "Use the form" versus "use the form as served" may seem like a subtle distinction to the developer, but it makes a huge difference to the internals of the machine. Domino cannot assume that a document was served using a particular form unless that form is also fed in the Request_Content of the submission -- it could have been served using an alternate form (via a form formula), or, for that matter, by a pure HTML form created by an agent or servlet.