Spring MVC form submission by ajax don't hitting the given ajax url: ERROR
Recently i experienced a problem regarding posting a form in spring mvc with ajax. i used bootstrap for css design. here i set data by using serialize method.but the form always submitted the url used in form action. <form:form class="" id="horizontalForm" name="horizontalForm" action="enroll.html"> so when i called ajax method it always hits say "enroll.html", not the given ajax url.I tried a lot, but not found any solution. then i found my problem when i clicked submit button. we can design our submit button a lot of ways. by input type submit, <input type="submit" value="Submit" id="submit"/> by input type button <input type="button" id="submit">Submit</input> by using bootstrap button <button type="button" class="btn btn-default">Submit</button> and suppose the ajax method is something like below, $....