0

I have following form.

enter image description here

once I click that Go to Next Section Button I can direct to next section in this form.

Here the whole code for this view and this the Layout file for that view page

But now Once I click I'm not getting any response and I cannot goto next page I'm getting following error.But this error occur in Firefox only , once I change debugging to Chrome this is working.

TypeError: validator is undefined file_path/jquery.validate.js

this is that error view

Error view 1

enter image description here

once I click above view I can see below view

Error view 2

enter image description here

Bugzilla debugger pointed out following section ([if (validator.settings.rules)]) of jquery.validate.js file has the error

staticRules: function( element ) {
    var rules = {};
    var validator = $.data(element.form, "validator");
    if ( validator.settings.rules ) {
        rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
    }
    return rules;
},
18
  • 1
    Can you please give us the source of html not server side code? Commented Nov 19, 2015 at 5:41
  • @ARIFMAHMUDRANA this is the HTML Commented Nov 19, 2015 at 5:42
  • Looking at your layout and the view, your have duplicate scripts all over the place (at least 3 copies of jquery - the last one wipes out the others). Put all you scripts in one place (either in the <head> or immediately before the closing </body> tags and ensure you have them in the right order and no duplicates Commented Nov 19, 2015 at 6:32
  • 1
    The scripts in the layout and view are a mess. Use bundles (and don't include the minified versions (bundling will do the minification in production) Commented Nov 19, 2015 at 7:03
  • 1
    @kez, Its still a mess. In the head you have @Scripts.Render("~/Scripts/jquery.min.js") followed by @Scripts.Render("~/Scripts/jquery.validate.min.js") and @Scripts.Render("~/Scripts/jquery.validate.unobtrusive.min.js"). Then you add @Scripts.Render("~/Scripts/jquery-1.7.1.min.js") wiping out all the previous scripts. Then at the bottom you have @Scripts.Render("~/bundles/jquery") again wiping out all the previous scripts. Start by getting rid of everything in the head. And then read Bundling and Minification Commented Nov 19, 2015 at 7:35

1 Answer 1

1

I believe you need to update your HTML and change <div class="form-horizontal"> to <form class="form-horizontal">. Don't forget to update the closing tag as well.

Sign up to request clarification or add additional context in comments.

1 Comment

Nope same error occur again once I moved to your solution

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.