fixing ajax request and updating links loc page