Link to home
Start Free TrialLog in
Avatar of opike
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.
SOLUTION
Avatar of Batalf
Batalf
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of knightEknight
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of opike
opike

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.