Answer the question
In order to leave comments, you need to log in
How to connect a page by load, passing part of the parent url to it at the same time?
Let's say the page https://site.ru/index.php?option=page&id=900 has the following code:
<span id="aaa">Нажать</span><div id="bbb"></div>
$(document).ready(function(){$("#aaa").click(function(){$("#bbb").load("ccc.php")})});
echo $_SERVER['REQUEST_URI'];
Answer the question
In order to leave comments, you need to log in
$(document).ready(function(){$("#aaa").click(function(){$("#bbb").load("ccc.php?path=" + window.location.pathname)})});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question