0

Hi,
I haved a form where elements in a rows can be added by clicking on "Add item".
Once the item is added, use can remove that item by clickon on the "remove" link. One of the fileds in the row has integer value and I want to added the values of all rows and show at the bottom as total of 100.
Here is the sample page which I have provided the original sourse.
http://equaser.com/aadev/dynamic-totals.html

Originally it was selct list but I changed it to text field. Now it is not validating or adding.
please help

3
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by gon1387
-3

Just wait for Experts.

Votes + Comments
what a pointless comment to make, are you just here for the signature link spamming by any chance?
0

This one's a jQuery plugin specific issue. You can check the documentation here: Validation Plugin

I viewed and checked your code. As what you have suspected, it was expecting "select" elements:

        required: function(value, element, param) {
            // check if dependency is met
            if ( !this.depend(param, element) ) {
                return "dependency-mismatch";
            }
            if ( element.nodeName.toLowerCase() === "select" ) {
//**Uncaught TypeError: Cannot read property 'nodeName' of undefined (repeated 2 times)**
                // could be an array for select-multiple or a string, both are fine this way
                var val = $(element).val();
                return val && val.length > 0;
            }
            if ( this.checkable(element) ) {
                return this.getLength(value, element) > 0;
            }
            return $.trim(value).length > 0;
        },

Above snippet can be found at line 989 of the plugin file. I've also included the part where the error appear. The line also leads to a part of the validation plugin doc: Validation Plugin: Required Doc

Please also check your inline script, as it's referencing to "select" elements.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.