You cannot redirect page using Ajax.
From W3Schools:
You can not redirect page using Ajax AJAX is a technique for creating fast and dynamic web pages.
AJAX is a technique for creating fast and dynamic web pages. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.
You need to redirect using : https://stackoverflow.com/a/506004/12004981