I have the HTML code given below. When I try to submit the inner form within the div element I found that the form submitted twice.
<html>
<head></head>
<bodY>
<form method="post" action="test.do">
<input type="text" name="test">
<div id="testdiv">
<form method="post" action="test.do">
</form>
</div>
</form>
</body>
I tested the above with IE7, and I have no idea how to do this.
Nesting forms is ill advised as it will cause unexpected results such as you are experiencing. Remove the nested form, and only use one. If you explain the purpose of the form better, we could probably help more in how to achieve the results you are after.
I haven’t seen many cases where nesting forms was a legitimate solution to a problem, so I would suggest rethinking the problem.