javascript - Mixing Ajax and Html Beging Form -
i have shared layout this:
<div id="bodyform"> @renderbody() </div> <div id="modal-price" tabindex="-1" role="dialog" aria-labelledby="modal-price-label" aria-hidden="true" class="modal fade"> <div id="divreplacment" class="modal-dialog dialog-width-80-xs"> <div class="modal-body"> <span>loading....</span> </div> </div> </div> <div id="modal-referalid" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false" aria-labelledby="modal-price-label" aria-hidden="true" class="modal fade"> <div id="divreferalreplacment" class="modal-dialog dialog-width-80-xs"> <div class="modal-content modal-color"> <div class="modal-header"> <h3>@selfserviceresource.signuptitle</h3> </div> <div class="modal-body"> @html.action("_referalform", "home") </div> </div> </div> </div> @scripts.render("~/bundles/jquery") <script src="~/scripts/jquery.unobtrusive-ajax.min.js"></script> @scripts.render("~/bundles/bootstrap") <script src="~/scripts/js.cookie.js"></script> <script src="~/scripts/main.js"></script>
inside second modal have ajax.beginform, , inside body have 1 html.beginform. ajax works brilliant, if when submit html.beginform got source code of page, not view - source code. problem? of course have return view inside post action html.beginform
i'm not sure if understand question wasn't able view contents of second modal, therefore, there can many reasons why not working. here couple of reasons able interpret:
- syntax error.
- nested forms. html doesn't allow nested forms (check here flow content). maybe causing error somehow?
if can provide contents of second modal, can narrow down cause of issue.
Comments
Post a Comment