Hello, please tell me, never worked with ajax js tried to bypass it. Now we met face to face. It was necessary to get a variable from js in php. I decided on QS to make a request to another php and get a result.
$.ajax ({ url: url, data: { map : coords[0], map2 : coords[1]}, success: function( result ) { alert( result ); } }); Actually, I did, and then what? Variables remain in js because they get out in alert. How not to be told, something Google displays a lot of information, but not the one you need. I don’t know how to deal with this. The task is to update without action on the page. In essence, everything is sent and returned. But in fact, the variable still remains in js.