Here I seem to be getting a undefined variable error for the variable outside1 and outside21.Cant seem why this would be the case as I declare it in a global.
As var outside; and var outside21;.
Where is the data variable created?
Instead of globally, what if you declared your two variables locally like this:
var outside1 = data.name;
var outside21 = data.main.temp;
Would that solve the issue you are having?