Below is a function right out of the ning manual (pg 23) (similar to
other opensocial samples given elsewhere) that works fine, BUT in the
one line I changed below, where MYVAR is a globally scoped variable,
it always comes out empty or undefined.   Tle only way I can seem to
pass needed info outside this function is to use
document.getElementById('whatever').innerHTML = MYVAR and I need to
manipulate it further and make branches before I publish.

What am I missing?  Can somebody give a poor guy a clue as to get a
var set so that it has a value outside this function?

function callback(foo) {
if (foo.hadError()) {
output("Error found!");
} else {
for (var x in ning.app.Field) {
if (ning.app.Field.hasOwnProperty(x)) {
if (foo.getField(ning.app.Field[x])) {
>>>>> MYVAR += "Field " + x + ": " + foo.getField(ning.app.Field[x]));
}
}
}
}
gadgets.window.adjustHeight();
}

--

You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en.


Reply via email to