There is a script to send a GET request:
$.ajax({ url:'/accounts/' + id, type:'GET', success: function(data){ console.log(data); if(data) { console.log('Success'); } else { console.log('No data received from server'); } }, error: function(){ alert('It was not possible to connect the server'); } }); The script is executed successfully and in the form of data receives the html file with the code of the requested page. The text of this file is displayed in the console, but how can it be displayed as a page? One could, of course, just make the transition to the desired page top.location.href = 'accounts/' + id . But the fact is that here is a simplified version of the script. In fact, a GET request should be sent with parameters that identify the user with the specified id (login and password). If you send them in the line top.location.href = 'accounts/' + id , then they will be displayed in the address bar of the browser.
ajaxrequest on the same page in a specific block? - Bald