window.onload = init;
function init(){
initializeEventHandlers();
getData(formatDate(new Date));
gotoDate('today');
}
//scripts that manage the UI for tracker.aspx
var dCurrentDate, sCurrentDate, sCurrentDayData, stepsVal, chipsVal, dayValue, dateValue, caloriesVal;
var fCurrentValue = 0;
var bAnimating, bSliding = false;
//scripts that manage the UI for tracker.aspx
var dCurrentDate, sCurrentDate, sCurrentDayData, stepsVal, chipsVal, dayValue, dateValue, caloriesVal;
var fCurrentValue = 0;
var bAnimating, bSliding = false;
getData(d)
{
steps = 5;
calories = 10;
chipsAmount = 3;
}
//I expect this to be 5+1, but it actually through an exception. I am wondering if its cause steps is not yet loaded. What can I do to make this actually 5 + 1.
steps + 1;
I load data from an XML which the sets some values. The probem I am facing is that when i set the values in the GetData method. The vars declared lose there value after the onload. What am i doing wrong and how can i make the values retain