If i see one person say place the variable outside the functions I am going to slap them. I just read through many forums were that is all they said. I am using Ajax to pull data meaning the data is pulled into a function. I can not place the variables outside it. This is what I need to be able to do.
Code:
function1()
{
var time = resp.test[0].time;
var amount = resp.test[0].amount;
alert(amount);
}
function2(obj)
{
if (time > 10){
doument.test.value = amount
}
}