javascript - "Uncaught TypeError: Illegal invocation" mystery (to me) -


i've looked through few dozen questions issue , still haven't been able figure out.

here's example of i'm doing. note new_client_name string "walmart".

function 1 (){    var new_client_name = allselectedinfo.client_name;    pickclient(new_client_name); }  function pickclient (new_client_name){    var new_client = new_client_name;    $.ajax({             url: 'php/get_cohorts.php',             type: 'post',             //datatype: 'json',             data: {                 client: new_client             },             success: function(data) {                 //do             }         }); } 

both functions execute fine , data want ajax call , appears working fine, except illegal invocation error, tied line starts $.ajax.

what's causing this?


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -