Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting a form

Status
Not open for further replies.

WannaLearn

Programmer
Jul 10, 2001
210
US
Hello. Not sure if this is doable, but no harm in asking. I have a page that has 3 forms on it, all three forms go to three different email addresses. On top of the page is a drop down list, when you select one option, and hit the button, it takes you down the page to the appropriate section. There you fill out the section, and hit the "continue" link, which takes you further down the page, another form, after filling out that form you submit it.
My problem is that &quot;section 1&quot;, &quot;section 2&quot;, &quot;section 3&quot; and &quot;Continue&quot; are all individual forms. &quot;section 1&quot;, &quot;section 2&quot;, &quot;section 3&quot; <form> tags all have different email addresses. And each section must be emailed with the &quot;continue&quot; form. How can I do that? How can I also email the &quot;Continue&quot; form with any section that the user fills out?

This is the code, the actual form has more form fields, like <option> and <textarea> and <radiobutton>, but for the purposes to post here, i'm only using one form field.

Code:
<HTML>
<HEAD>

<script>
function goThere() {
  if(document.form1.select1.options[0].selected == true) {
    alert(&quot;Select Something&quot;);
    return false;
  }
  else {
    window.location.href=document.form1.select1.options[document.form1.select1.selectedIndex].value
  }
}
</script>
</HEAD>

<BODY BGCOLOR=&quot;#ffffff&quot;>
<CENTER>
  <br>
  <table width=&quot;700&quot; border=&quot;0&quot; align=&quot;center&quot;>
    <tr valign=&quot;top&quot;> 
      <td>
        <center>
          <table cellpadding=&quot;2&quot; align=&quot;Center&quot;>
            <tr valign=&quot;Top&quot;> 
              <td> <form name=&quot;form1&quot;>
                  <select name=&quot;select1&quot;>
                    <option value=&quot;&quot;>Please Select One of the Following:</option>
                    <option value=&quot;#Section1&quot;>Section 1</option>
                    <option value=&quot;#Section2&quot;>Section 2</option>
                    <option value=&quot;#Section1&quot;>Section 3</option>
                  </select>
                  <input type=&quot;button&quot; value=&quot;Take me there&quot; onClick=&quot;return goThere();&quot;>
                </form></td>
            </tr>
          </table>
          <p> </p>
          <p> </p>
          <p> </p>
          <p> </p>
          <p> </p>
        </center>
        <hr>
        <table width=&quot;700&quot; align=&quot;center&quot;>
  <tr>
    <td>
<form method=&quot;get&quot; action=&quot;&quot;>
                <p> 
          <a name=&quot;Section1&quot;></a><hr>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr> 
                    <td width=&quot;72%&quot;><font size=&quot;2&quot; color=&quot;#ff0000&quot;><b>SECTION 
                      1 :</b></font><font size=&quot;2&quot; color=&quot;004080&quot;>  For this 
                      area, please enter the requested information.</font></td>
                    <td width=&quot;28%&quot;> </td>
            </tr>
          </table>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr valign=&quot;middle&quot;> 
                    <td><font size=&quot;2&quot;><b>My question is: </b></font> <table width=&quot;90%&quot; cellpadding=&quot;2&quot;>
                        <tr valign=&quot;middle&quot;> 
                          <td width=&quot;56%&quot;><textarea name=&quot;section 1 txt&quot; cols=&quot;30&quot;></textarea> 
                          </td>
                          <td width=&quot;1%&quot;> </td>
                          <td width=&quot;32%&quot;><font size=&quot;2&quot;><b><a href=&quot;#organization&quot;>continue</a></b></font></td>
                          <td width=&quot;11%&quot;> </td>
                        </tr>
                      </table></td>
                  </tr>
                </table>
</form>
              <p>
              <p> 
              <form method=&quot;GET&quot; action=&quot;&quot;>
          <a name=&quot;Section2&quot;></a><hr>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr > 
                    <td width=&quot;69%&quot;><font face=&quot;ARIAL, TAHOMA, VERDANA&quot; size=&quot;2&quot; color=&quot;#ff0000&quot;><b>SECTION 
                      2 :</b></font><font face=&quot;ARIAL, TAHOMA, VERDANA&quot; size=&quot;2&quot; color=&quot;004080&quot;> 
                       For this area, please enter the requested information.</font></td>
                    <td width=&quot;31%&quot;></td>
                  </tr>
                </table>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr> 
                    <td width=&quot;575&quot;><font size=&quot;2&quot;><b>My question is: </b></font><BR> <table width=&quot;90%&quot; cellpadding=&quot;2&quot;>
                        <tr valign=&quot;middle&quot;> 
                          <td width=&quot;56%&quot;><textarea name=&quot;section 2 txt&quot; cols=&quot;30&quot; id=&quot;section 2 txt&quot;></textarea> 
                          </td>
                          <td width=&quot;1%&quot;> </td>
                          <td width=&quot;39%&quot;><font size=&quot;2&quot;><b><a href=&quot;#organization&quot;>continue</a></b></font></td>
                          <td width=&quot;4%&quot;> </td>
                        </tr>
                      </table></td>
                  </tr>
                </table>
</form>
<p>
<p>
<form method=&quot;GET&quot; action=&quot;&quot;>
                <font size=&quot;2&quot; color=&quot;#ff0000&quot;><b><a name=&quot;Section3&quot;></a></b></font> 
                <hr>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr > 
                    <td width=&quot;69%&quot;><font size=&quot;2&quot; color=&quot;#ff0000&quot;><b>SECTION 
                      3 :</b></font><font size=&quot;2&quot;>  For this area, please 
                      enter the requested information.</font></td>
                    <td width=&quot;31%&quot;></td>
                  </tr>
                </table>
                <table width=&quot;100%&quot; cellpadding=&quot;2&quot;>
                  <tr> 
                    <td><font size=&quot;2&quot;><b>My question is: <br>
                      </b></font> <table width=&quot;90%&quot; cellpadding=&quot;2&quot;>
                        <tr valign=&quot;middle&quot;> 
                          <td width=&quot;56%&quot;><textarea name=&quot;section 3 txt&quot; cols=&quot;30&quot; id=&quot;section 3 txt&quot;></textarea> 
                          </td>
                          <td width=&quot;1%&quot;> </td>
                          <td width=&quot;38%&quot;><font size=&quot;2&quot;><b><a href=&quot;#organization&quot;>continue</a></b></font></td>
                          <td width=&quot;5%&quot;> </td>
                        </tr>
                      </table></td>
                  </tr>
                </table>
              </form>
<p>
<p>

              <form method=&quot;GET&quot; action=&quot;&quot;>
                <p> <br>
                <p>  
                <hr>
          <br>
                <a name=&quot;organization&quot;></a><font color=&quot;ff0000&quot; size=&quot;2&quot;><b>CONTINUE:</b></font><br>
          <br>
                <table>
                  <tr> 
                    <td width=175 align=RIGHT></td>
                    <td></td>
                  </tr>
                  <tr valign=&quot;middle&quot;> 
                    <td width=175 align=RIGHT><font face=&quot;ARIAL, TAHOMA, VERDANA&quot;
	    size=&quot;1&quot;><b>Your Name:</b></font></td>
                    <td width=300> <input type=&quot;text&quot; name=&quot;YOUR NAME&quot; maxlength=&quot;30&quot; size=&quot;30&quot;> 
                    </td>
                  </tr>
                  <tr valign=&quot;middle&quot;> 
                    <td width=175 align=&quot;RIGHT&quot;><font face=&quot;ARIAL, TAHOMA, VERDANA&quot; size=&quot;1&quot;><b>Your 
                      Number:</b></font></td>
                    <td width=300> <input type=&quot;text&quot; name=&quot;YOUR TELEPHONE NUMBER&quot; maxlength=&quot;14&quot; size=&quot;14&quot;> 
                    </td>
                  </tr>
                </table>
                <br>
                  <input type=&quot;submit&quot; value=&quot;Submit Your Question&quot; name=&quot;submit&quot;>
                  <input type=&quot;reset&quot; value=&quot;Reset&quot; name=&quot;reset&quot;>
              </form>
    </td>
  </tr>
</table>  
      </td>
    </tr>
  </table>
</CENTER>
</BODY>
</HTML>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top