M
M
Maxim Lesnikov2014-03-26 16:05:29
JavaScript
Maxim Lesnikov, 2014-03-26 16:05:29

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>

Other pages have the same footer with the same code.
How to make it so that when you click on a district, a new page opens and shows exactly those districts?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vadim Yakovlev, 2014-03-26
@FrimInc

uhh...
href and $_SESSION ?

M
Maxim Lesnikov, 2014-03-26
@maximka_l

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.

R
Roman Sokharev, 2014-03-26
@greabock

Pass parameters in the request. POST or GET is up to your taste.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question