#155: Properly send server (php) ajax data to javascript

Resolves #155.