I have a variable - xin jquery, I load the php part into a block div, and I need to send this variable to it.
So -
$(document).on('click','#link',function () {
var x=5;
$("#block").load("file.php");
});
As a result, I'm still on the same page. I just need to have it variable x.
I am thinking about using the GET method or XMLHttpRequest, but I do not want to use another page, I just need to load the php part into a block.
source
share