jQuery: Why do get this error: Cannot call method 'call' of undefined?
-
in this the success callback is throwing this error..how to fix this..? $('a.trigger-create-customer').dialog({ role : 'alertdialog', appearence : 'bottom', closeText : 'x', center : (!Modernizr.touch), onLoad : function () { if ($.placeholder) { $('input[placeholder]').placeholder(); $('textarea[placeholder]').placeholder(); } $(".clear").click(function(e){ e.preventDefault(); $('#create-modal input').val("") ; }); $('#dialog #logo').bind('change', function(e) { // alert('This file size is: ' + this.files[0].size/1024/1024 + "MB"); if (this.files[0].size > 1024) { e.preventDefault(); alert("File Size Can't be more than 1kb"); $('#dialog #logo').val("") ; } }); // - Create Form $('#dialog #form-create-customer').validate({ ignore: '', rules: { "short-name": { required: true, placeholder: true }, "full-name": { required: true, placeholder: true }, email: { required: true, email: true, placeholder: true }, "contact-number": { required: true, placeholder: true } }, messages: { "short-name": { required:'Type in your Short Name', placeholder:'Please type in your Short Name' }, "full-name": { required:'Type in your Full Name', placeholder:'Please type in your Full Name' }, email: { required:'Type in your email', placeholder:'Type in your email', email:'Type in a valid email' }, "contact-number": { required:'Type in your Full contact number', placeholder:'Please type in your contact-number' } }, errorPlacement: function (errlbl, el) { $(el).after(errlbl); $(el).parents('.controls').addClass('error'); }, success: function (errlbl) { $(errlbl).parents('.controls').removeClass('error'); $(errlbl).remove(); } }); }, onClose : function () {} });
-
Answer:
http://stackoverflow.com/ is probably going to be more conducive to getting an answer for a specific programming question. With that in mind, it's rather impossible to debug this without seeing what your code is. Essentially, the error is telling you that you are attempting to call a function on an object that doesn't actually exist (is undefined).
Stephen Wan at Quora Visit the source
Other answers
Based on the information given I can suggest to debug the code in Firebug. Click the line which is showing the error in Console, Go to Stack and you can judge from there what is the cause of the problem.
Raghav Khunger
Related Q & A:
- How to mock static method call by constructor?Best solution by Stack Overflow
- Why do I get the error "A network error occured while connecting to the server?Best solution by Yahoo! Answers
- When I join any chat room why I get an error?Best solution by Yahoo! Answers
- Why do I get an error message when I am trying to close Internet explorer page?Best solution by Yahoo! Answers
- Why do I get an error message when I open my address book?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.