jquery nested ajax success callback not working -


function getbyname(name) {         $.ajax({             type: 'get',             url: 'getprogress',             datatype: "json",             data: "name=" + name,             success: function(data){                 updateprogress(data, name);         }         });      }  function updateprogress(data, name){         $.ajax({             type: 'get',             url: 'getdesc',             datatype: "json",             data: "name=" + name,             success: function(data){                 alert('asdf');                     }         }); } 

unable execute success callback of second ajax request. second ajax call executed successfully. server returns correct response success callback not getting executed. please help..

where "name" in function.?

function updateprogress(data){         $.ajax({             type: 'get',             url: 'getdesc',             datatype: "json",             data: "name=" + name,             success: function(data){                 alert('asdf');                     }         }); } 

add "name" in function parameter.

function updateprogress(data,name){         $.ajax({             type: 'get',             url: 'getdesc',             datatype: "json",             data: "name=" + name,             success: function(data){                 alert('asdf');                     }         }); } 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -