Reputation: 23534
I'm using jEditable and instead of using ajax to save, I just want to use the callback function to put the contents into a hidden form elements, the problem is using the callback function I receive this error:
Uncaught TypeError: Cannot read property 'settings' of undefined
This is the code I'm using:
$('.editable').editable(function(value, settings) {
console.log(this);
console.log(value);
console.log(settings);
return(value);
}, {
submit : 'OK'
});
Any ideas what the problem could be? Thank you!
Upvotes: 0
Views: 2188
Reputation: 27599
I was getting this error because I was making a call to $("#element").rules()
before a call to $("#form").validate()
on the form DOM element. There error was the same using both jQuery Validate version 1.7 and 1.9 (I upgraded per the above suggestion before getting it to work).
Upvotes: 0
Reputation: 9090
I had exactly the same error message. But in that case I used the plugin ajaxupload for jEditable in my Javascript and called it like that:
$("edit_photo").editable{type:"ajaxupload"};
On updating jQuery I made only one file containing all the minified stuff to reduce the web to a single request. Then I recognized, that the plugin ajaxupload just was missing.
Upvotes: 1
Reputation: 1056
I had simillar problem with dblckick event.
Jquery.validate plugin (v 1.7) was throwing this error.
Fixed by installing new version of Jquery.validate (v 1.9).
Upvotes: 0