I want to submit a form using JavaScript. Basically I need to do some pre-processing when the user clicks the Submit button to assure that all the necessary fields are filled out BEFORE I allow the form to actually be submitted. I found that I can do the actual submit in JavaScript with something like:
Code:
document.LAYOUTFORM.submit();
where LAYOUTFORM is the ID of the form.
In NetObjects, when you declare a page as a form it automatically names it LAYOUTFORM. But that's the NAME of the form, not its ID. It seems that there's no way to give the LAYOUT form an ID. I tried defining a table as a form (and putting all my controls inside it) and although it does cause <FORM> tags to be created around the table, again it does not provide a means of giving the form an ID.
So how do I do this? How can I specify an ID for the <FORM> tag? Or otherwise cause the page to be submitted properly?