0

i have two form as following

<form id="form1" action="/Account/form1">
 <input type="text" name="baar" />
 <input type="text" name="baar1" />
<div>
 this is first form 
</div>


// here second form starts 
<form id="form2" action="/Account/form2">
 <input type="text" name="foo" />
 <input type="text" name="foo1" />
 <button id="btnclick" type="button">Submit</button>
</form>


 <button type="submit">Submit</button>
</form>

now i want that when i click #btnclick inside form2 then my form2 submit with all inputs in form2 , but not form1 .

Ahsan
  • 271
  • 1
  • 8
  • 16
  • possible duplicate of [How do you overcome the html form nesting limitation](http://stackoverflow.com/questions/597596/how-do-you-overcome-the-html-form-nesting-limitation) – McGarnagle May 08 '12 at 05:24

1 Answers1

3

You CANNOT nest the forms. End the first form first to start another one.

Jonas T
  • 2,989
  • 4
  • 32
  • 43