adapt javascript for new function locations in AJAX controller.