jquery - MVC 4 client side validation not working for the form which is loaded using Ajax -
i have admin page in user clicks on links , corresponding partialview
, containing web form loaded inside particular div on admin page using ajax.
all of the
"~/scripts/jquery-2.0.3.js", "~/scripts/jquery.unobtrusive-ajax.js", "~/scripts/jquery.validate.js", "~/scripts/jquery.validate.unobtrusive.js"
are referenced within admin page , when partialview
loaded, jquery client side validation won't work.
but when reference scripts within partialview
, works fine don't intend each partialview
because numerous , each time each 1 loads, @ least 2 of .js files must requested server again.
is there way can have scripts inside parent (admin) page without issue ?
you need on each 1 of partial views:
$(document).ready(function () { $.validator.unobtrusive.parse("#yourformid"); });
basically validation not bound on dynamically rendered form...
Comments
Post a Comment