0

I have 2 forms one after another, but the second one is not posting at all. Everything works fine except the submitting. Can I have 2 forms like this?

 <form action="getRates.php" name="rates" method="post" onSubmit="popupform(this, 'join')">
                          <table style="width: 216px">
                            <tr>
                              <td style="width: 115px; height: 49px;"><span class="style16">Weight</span><br/>
                                  <input type="text" id="weight" name="weight" size="10" maxlength="4"/>
                                  <input type="hidden" id="weightOne" name ="weightOne">
                                  <input type="hidden" id="weightTwo" name ="weightTwo">
                                  <input type="hidden" id="weightThree" name="weightThree">
                                  <input type="hidden" id="weightFour" name="weightFour">
                              </td>
                              <td align="right" style="width: 68px; height: 49px;" valign="top"><span class="style16">Zip Code</span><br/>
                                  <input type="text" id="zip" name="zip" size="10" maxlength="5"/>
                              </td>
                            </tr>
                            <tr>
                              <td style="width: 115px">
                              <input name="submit" type="submit" value="Door Hanger Rates" style="width: 138px" />
                              </td>
                            </tr>
                          </table>
                          </form>
                         <form action="getBusinessRates.php" name="businessRates" method="post" onSubmit="popupform(this, 'join')">
                          <table style="width: 216px">
                            <tr>
                              <td style="width: 115px; height: 49px;"><span class="style16">Weight</span><br/>
                                  <input type="text" id="businessWeight" name="businessWeight" size="10" maxlength="4" />
                              </td>
                              <td align="right" style="width: 68px; height: 49px;" valign="top"><span class="style16">Zip Code</span><br/>
                                  <input type="text" id="businessZip" name="businessZip" size="10" maxlength="5" />
                              </td>
                            </tr>
                            <tr>
                              <td style="width: 115px">
                              <input name="businessSubmit" type="submit" value="Business Card Rates" style="width: 138px" />
                              </td>
                            </tr>
                          </table>
                         </form>
2
  • you really shouldn't be nesting a form inside a form? Commented Aug 5, 2010 at 15:46
  • He isn't, the first </form> is before the second <form>? Commented Aug 5, 2010 at 15:57

1 Answer 1

1

Your same code is working, you can check it out here. It might be some other issue probably.

Sign up to request clarification or add additional context in comments.

3 Comments

That is weird. The second submit button is not working at all on my page
DOCTYPE could be the possible issue also but i am not 100% sure. Check to see what are you using.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.