asp.net mvc 4 - Submit button not doing anything from within a fancybox dialog in mvc 4 application -
currently, have edit user dialog (fancybox) has link replaces dialog fancybox dialog changing password. seems behaving correctly until click submit button on change password dialog. nothing happens @ all. checked fiddler , no request being made. check firefox verify change password controls in fact wrapped in correct form tags, , are. gives? i've looked through net find similar problems , there some, none using mvc4 , didn't quite understand them.
these fancybox modals being loaded through partial view. instance, link opens first dialog link href="edituserpartialaction". works great. model opened link first model same thing, has href="changepasswordpartialaction". loads perfectly. button doesn't anything.
here html being generated. can see form looks right , should work (unless im overlooking something). , again, nothing happening. no request being made let alone error. cancel button works replaces dialog previous edit user dialog.
<div class="fancybox-wrap fancybox-desktop fancybox-type-ajax fancybox-opened" tabindex="-1" style="width: 533px; height: auto; position: fixed; top: 20px; left: 685px; opacity: 1; overflow: visible;"> <div class="fancybox-skin" style="padding: 15px; width: auto; height: auto;"> <div class="fancybox-outer"> <div class="fancybox-inner" style="overflow: auto; width: 503px; height: 279px;"> <div id="modal-page"> <h1>change password</h1> <form method="post" action="/accountuser/changepassword?userid=0"> <div class="field_wrapper password"> <label for="newpassword">newpassword</label> <input id="newpassword" type="password" placeholder="password" name="newpassword"> </div> <div class="field_wrapper password"> <label for="confirmpassword">confirmpassword</label> <input id="confirmpassword" type="password" placeholder="confirm password" name="confirmpassword"> </div> <div class="field_wrapper submit"> <a class="close_modal gradient change-password" href="/accountuser/edituserpartial?userid=0">cancel</a> <input class="gradient" type="submit" value="change" name="update"/> </div> </form> </div> </div> </div> <a class="fancybox-item fancybox-close" href="javascript:;" title="close"></a> </div> </div>
update: there isn't real added jquery/javascript. other fancybox library itself, added hooks them few classes:
// main.js
$(document).ready(function() { $('.edit, .adduser, .delete').fancybox({ maxwidth : 486, autosize : true, }); });
// plugins.js
// avoid `console` errors in browsers lack console. (function() { var method; var noop = function () {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupcollapsed', 'groupend', 'info', 'log', 'marktimeline', 'profile', 'profileend', 'table', 'time', 'timeend', 'timestamp', 'trace', 'warn' ]; var length = methods.length; var console = (window.console = window.console || {}); while (length--) { method = methods[length]; // stub undefined methods. if (!console[method]) { console[method] = noop; } } }()); // place jquery/helper plugins in here.
Comments
Post a Comment