setting up AJAX communication for chord widget