Answer the question
In order to leave comments, you need to log in
How to make Javascript work on a new page?
Good afternoon everyone. There is Javascript attached to Bitrix.
Selects city districts and loads them on the site (without reloading the page).
Here is the footer code where the districts are placed:
<li>
<div class="caption">Район города</div>
<?$districts = get_district_name();
if($d_count = sizeof($districts[1])) {?>
<ul class="reset foot-colunm_menu js-foot-location">
<?foreach($districts[1] as $k=>$distr) {?>
<li><span onclick="setDistrFoot(this)" name="<?=$k?>"><?=$distr?></span></a></li>
<?}?>
</ul>
<?}?>
</li>
Answer the question
In order to leave comments, you need to log in
Can you give an example?
This code is responsible for the link.
If you do this:
Then a new page opens (for example, the main one, which is what we need). But the script for the region filter does not work.
Pass parameters in the request. POST or GET is up to your taste.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question