opike
asked on
issue with multiple forms in an html page
I have an HTML page that contains 2 forms. Here is a simplified representation of what the form structure looks like:
<form name="formA" action=./formA.jsp method="get">
<input type="Submit" name="InputFormA" value="SubmitA">
</form>
<form name="formB" action=./formB.jsp method="get">
<input type="Submit" name="InputFormB" value="SubmitB">
</form>
The problem I'm having is that when the button in Form B is clicked, a submit request is sent to formA.jsp. If I comment out the code for form A, then the form B button correctly submits to formB.jsp. I'm going to try to upload the actual code that is exhibiting the problem.
<form name="formA" action=./formA.jsp method="get">
<input type="Submit" name="InputFormA" value="SubmitA">
</form>
<form name="formB" action=./formB.jsp method="get">
<input type="Submit" name="InputFormB" value="SubmitB">
</form>
The problem I'm having is that when the button in Form B is clicked, a submit request is sent to formA.jsp. If I comment out the code for form A, then the form B button correctly submits to formB.jsp. I'm going to try to upload the actual code that is exhibiting the problem.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
put your action in quotes ... and make sure you have a closing </form> tag for form A before the opening <form tag for form B.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem had to do with how I had the first form nested inside a table definition. Thanks for all the suggestions - I spilt up the points 4 ways.