jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › Validator, Drag & Drop, Sortable › c.offset(…) is undefined on validate
Tagged: jqxvalidator, validator
This topic contains 3 replies, has 2 voices, and was last updated by darkelf 10 years, 6 months ago.
-
Author
-
Hi;
I using to validator for check user input. But sometimes take to this error.TypeError: c.offset(…) is undefined
…var i=a(q.input);c=a(q.input);j.push(c);h=c.offset().top;if(e>h){e=h;g=c}}d–;if… jqxvalidator.js (line 7, col 1119)It’s often work. But sometimes (I dont know how) give error like this…
(I not sure to paste my code. Because its evaluate from your example code…)
thanks
Hello darkelf,
Please, provide a sample which illustrates your issue.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Ok. I have progress in my code.
I have two dropdown field. I need at least one field selected. I mean user must select field one, field two or field one + field two.
My code is:{ input: ‘#field1’, message: ‘Mandotory Field!’, action: ‘keyup, blur’, rule:
function () {
if ($(‘#field1’).val() > 0 || $(‘#field2’).val() > 0) { return true; } else { return false; }
}
},
{ input: ‘#field2’, message: ‘Mandotory Field!’, action: ‘keyup, blur’, rule:
function () {
if ($(‘#field1’).val() > 0 || $(‘#field2’).val() > 0) { return true; } else { return false; }
}
},I have’nt got any error after loading. But while using i got
TypeError: c.offset(…) is undefined
…var i=a(q.input);c=a(q.input);j.push(c);h=c.offset().top;if(e>h){e=h;g=c}}d–;if… jqxvalidator.js (line 7, col 1119)
error.
I trying to comment one block like this:/*
{ input: ‘#field1’, message: ‘Mandotory Field!’, action: ‘keyup, blur’, rule:
function () {
if ($(‘#field1’).val() > 0 || $(‘#field2’).val() > 0) { return true; } else { return false; }
}
},
*/
{ input: ‘#field2’, message: ‘Mandotory Field!’, action: ‘keyup, blur’, rule:
function () {
if ($(‘#field1’).val() > 0 || $(‘#field2’).val() > 0) { return true; } else { return false; }
}
},
it’s work vell.
Any idea of this stuation?
thanks.Ok my mistake. L solve my problem.
L made a typo. I type field1 -> filed1Thanks.
-
AuthorPosts
You must be logged in to reply to this topic.