I am using the below test code to call a javascript function from ajax method after the success block and pass the success value to a javascript funtion.It's working fine. Now i want to get javascript return message from ajax call. It always return null.
$.ajax({
url:"getvalue.php",
success:function(data) {
var retval= change_format(data);
alert(retvl);//always return null
I can't get the result
}
});
function change_format(data)
{
do something.....
value = "Some Data"; having some data
return value;
}