How to call jQuery function with multiple parameters?

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

Was this solution helpful to you?

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

Just Added Q & A:

Find solution

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.