Rozamunda
asked on
asynch false not working
Hi , What am I doing wrong here ?
what is inside success is returned but outside returns undefined value
what is inside success is returned but outside returns undefined value
function getfromto(starts,ends)
{
var select;
var ft =
'from=' + starts + '&to=' + ends;
$.ajax({
url:'lft.php',
type:'GET',
asynch: false,
data: ft,
success: function(data)
{
select = data;
console.log(select);
}
});
console.log(select);
return select;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.