There are some errors in your javascript
- There is no results object in your data parameter.
- Syntax error in your document.write statements
Try this code:
<script>
xively.setKey("yWYxyi3HpdqFCBtKHueTvOGoGROSAKxGRFAyQWk5d3JNdz0g");
xively.datastream.list(
61916 //id from the tutorial example
, function (data) {
data.forEach(function (datastream) {
document.write("<br><br>Datastream ID:"+JSON.stringify(datastream["id"]));
document.write("<br><br>Current value:"+JSON.stringify(datastream["current_value"], null, 4));
});
});
</script>