I can log the value, but it returns as "undefined".

var getOffice = function(county_id) {
    var d = loadJSONDoc('/office_from_countytype/'+ county_id +'/');
    var off_id;
    d.addCallback(function (result) {
        off_id=result[0].fields['office'];
        log('got office id: '+ off_id);
        return off_id;
    });
}

The log entry will show "INFO: got office id: 14", but the function
returns "undefined".

-- 
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en.

Reply via email to