Foren

Jeditable & Jquery.validate

rhd 213, geändert vor 13 Jahren.

Jeditable & Jquery.validate

New Member Beiträge: 6 Beitrittsdatum: 23.09.09 Neueste Beiträge
Hi,

I am using jquery.validate.js to validate my fields in a form.
I have also made these jeditable on click.
my problem now is, when ever I click on the editable field and enter/modify the contents am getting a error is firefox - firebug console

Error:
validate is undefined ---- jquery.validate.js -- line 276.

The respective code is

function delegate(event) {

var validator = $.data(this[0].form,"validator");
validator.settings["on" + event.type]

&& validator.settings["on"
+ event.type].call(
validator, this[0]);

}

The code am using for jeditable field is

jQuery('#description').editable(function(value, settings) {
jQuery('[name=<portlet:namespace />description]').val(value);
return(value);
},
{
type : 'textarea',
height : '80px',
submit : 'Update',
cssclass: 'formEdit'
});

when i googled for this I got a explanation "When using Jeditable, there is no form element to bind jQuery Validate rules with. Instead, when an editable element is clicked or activated, it dynamically creates a new form and input element and destroys them after the user is done editing."

Then, is the error due to form name (this[0].form).
How can I solve this error.

Thanks for help

RHD