Submit 2 forms

Results 1 to 3 of 3

Thread: Submit 2 forms

  1. #1
    DN Guest

    Default Submit 2 forms

    I have 2 forms on one page. The first form is used to capture user input and the second form is hidden and is used to e-mail information about the user.<BR><BR>How do I submit both forms with one submit click (Without the use of ASP).<BR><BR>Currently I&#039ve got - <BR><BR>function frmSubmitter(){<BR>document.forms[1].submit();<BR>return<BR>}<BR><BR>I&#039m calling the function from the onSubmit event of forms[0].<BR><BR>&#060;FORM METHOD="POST" action="nextpage.html" onSubmit="return frmSubmitter();"&#062;<BR><BR>This function DOES execute and it SAYS it will send the e-mail, and then it DOES submit the second form, but the e-mail never actually get&#039s sent.<BR><BR>&#060;scratching head&#062;<BR>Please help me to understand this foreign language.<BR>&#060;/scratching head&#062;<BR><BR>DN<BR>:)<BR><BR>

  2. #2
    Guhan Guest

    Default RE: Submit 2 forms

    What do u have actually in the second form<BR>is that the information pertaining to the mail like id.<BR>if yes, then in the firstform itself use a hidden variable to store that and try now by submitting the first form<BR><BR><BR>guhan

  3. #3
    DN Guest

    Default RE: Submit 2 forms

    I&#039ve re-evaluated slightly.<BR><BR>&#060;bit of background&#062;<BR>I don&#039t have access to CDONTS or other means of server side e0-mail.<BR>&#060;/&#062;<BR><BR>I need post some info to next page, and send an email at same time.<BR><BR>What I&#039ve got now is a frameset with the hidden form in a hidden frame. The visible form in the visible frame submits the hidded form in the hidden frame with this function.<BR><BR>function frmSubmitter(){<BR>parent.sub.document.forms[0].submit();<BR>document.forms[0].submit();<BR>}<BR><BR>I ran it and it crashed my IE browser.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts