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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit button not working rpoperly. EZ fix?

Status
Not open for further replies.

Chucklez

Programmer
Jul 25, 2002
104
US
Hello, I have the following code, and when I click on the first submit button (in form frmAttack) nothing happens. The other buttons work, but the first dosent. Even if I cut and paste code from one of the buttons that work onto the button that dosent, I still get nothing.

Am I missing something here?
Code:
<html>
   <head>
      <title>Enemies of the Wassai</title>
      <h1>Enemies of the Wassai<h1>
      <h4>Leaders Index<h4>
   </head>
   <body bgcolor="#000000" text="#CC9969">
      <form name="form">
         <table width="100%" border="1">
            <tr>
               <td><b>Attack A Mage</b></td>
               <td><b>Add A Mage</b></td>
               <td><b>Delete A Mage</b></td>
               <td><b>Modify A Mage</b></td>
               <td><b>Change Password</b></td>
               <td><b>Add A Member</b></td>
            </tr>
            <tr>
               <td>
                  <form name="frmAttack" action="EnemyMageAdd.asp"> 
                     <input type="submit" value="Submit" name="submit">
                  </form>
               </td>
               <td>
                  <form name="frmAdd" action="EnemyMageAdd.asp"> 
                      <input type="submit" value="submit" name="submit">
                  </form>
               </td>
               <td>
                  <form name="frmDelete" method="post" action="EnemyMageDelete.asp"> 
                     <input type="submit" value="submit" name="submit">
                  </form>
               </td>
               <td>
                  <form name="frmModify" method="post" action="EnemyMageModify.asp"> 
                     <input type="submit" value="submit" name="submit">
                  </form>
               </td>
               <td>
                  <form name="frmPasswordChange" method="post" action="PasswordChange.asp"> 
                     <input type="submit" value="submit" name="submit">
                  </form>
               </td>
               <td>
                  <form name="frmAddMember" method="post" action="AddMember.asp"> 
                     <input type="submit" value="submit" name="submit">
                  </form>
               </td>
            </tr>
         </table>
      </form> 
      <p><table width='80%' align='center' cellpadding='3' cellspacing='0'><tr><td align='center' valign='middle' id='copyright'>&copy; Debacle<br></td></tr></table><p>
   </body>
</html>
 
It's probably confused by having one form nested inside another...
Code:
   <body bgcolor="#000000" text="#CC9969">
      [red]<form name="form">[/red]
         <table width="100%" border="1">
            ... table content inc. other forms ...
         </table>
      [red]</form>[/red]
Remove that outer form and it should work.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
actually, to be nit-picky, form elements are not supposed to be outside of forms. additionally, as ChrisHunt mentioned, nester forms are not valid html (and therefore will not function correctly).


*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top