Updated bind button to use AJAX requests to avoid page redirection: