0

I am using this ajax function

function testfunction(ttl){

        jQuery.ajax({url:"",
           type: "POST",
           data: { 'action_sub':'Load_twittercontact'},
           success:function(res){

                  //Do something

         },error:function(e){
                console.log(e.error);

        }});
    }

After some time , i got a error in error conolse. This is the error

function (){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this} 

How to solve this issue ?

5
  • please provide the error you are getting, not the source code Commented Nov 22, 2013 at 6:18
  • Your error is the source code? Commented Nov 22, 2013 at 6:20
  • This is the error which i got in chrome console function (){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this} Commented Nov 22, 2013 at 6:36
  • also this arguments: null caller: null length: 0 name: "" prototype: Object proto: function Empty() {} apply: function apply() { [native code] } arguments: null bind: function () { bindAsEventListener: function (object) { call: function call() { [native code] } caller: null constructor: function Function() { [native code] } length: 0 name: "Empty" toString: function toString() { [native code] } proto: Object Commented Nov 22, 2013 at 6:38
  • check ajax url is working and accepts POST? Commented Nov 22, 2013 at 7:47

1 Answer 1

1

Your error handler definition should be like the following code:

error: function(requestObject, error, errorThrown) { }

And to know what exactly happened, you should log the error parameter, like the following code:

error: function(requestObject, error, errorThrown) {

     console.log(error);

}

Hope this helps.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks..I tried this and i got this error: "error" errorThrown: ""
I got this error only in Google chrome. In all other browsers it is working fine. Can you help me to solve this issue in Google chrome ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.