ajax just refreshes the page without performing callback to webcam app