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

Recommended Answers

All 2 Replies

Just wait for Experts.

commented: what a pointless comment to make, are you just here for the signature link spamming by any chance? -2

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.