#136: Return ajax values from server to javascript

Resolves #136.