I hava ajax call and I am getting the data back correctly. But i am unable to assign data to local variable. I am trying to assign data to item_price. I am getting data as 100.00 OR 115.25
Here is my ajax code
$.ajax({
type: "get",
url: "index.php?module=product&view=price",
data: { code: v },
dataType: "json",
success: function(data) {
item_price = data;
}
});
Thank you Guys, async: false, worked for me.
try this