Hi all,
How do I use data from json in a javascript function?
I have something like this!
$('#monday').click(function(){
test();
});
function test() {
$.getJSON('singleday.php?dld='+ id+'&chkdag=' + 1, function(json) {sday=json});
OtherFunction();
}
Now I want to transfer the json date into an other function. something like this
function OtherFunction() {
for (var i in sday) {
// do somthing
}
}
I just can 't figure it out how?
Leon