162
rated 0 times
[
165]
[
3]
/ answers: 1 / hits: 16244
/ 13 Years ago, wed, august 17, 2011, 12:00:00
I've spent the last two hours trying to figure out how to do this but nothing is working. Here is a short sample of some of my code. I want to get arrtime and several other similar variables out of the function so I can use them globally. Any ideas? Nothing too complicated please, I'm no expert (obviously).
function showTest(str) {
........
var arrayvals = JSON.parse(xmlhttp.responseText);
var arrtime= (arrayvals[0]);
}
var testvar=arrtime;
document.getElementById(testing).innerHTML=testvar;
More From » variables