POI cat. filter

Home Forums MapPress Support POI cat. filter

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11400
    puck
    Participant

      Hi,

      i use a blank page in blog to filter POI categories with this code

      the problem on this code is PAGE refresh. I want to refresh only the map
      Please help me with  some ideas
      The blog is http://www.matchfishing.ro/?page_id=5507

      Thanks

      <?php
      /*
      Template Name: Maps Page

      */
      ?>
      <style>
      label {
      border:1px solid #ccc;
      padding:10px;
      margin:0 0 10px;
      display:block;
      }
      label:hover {
      background:#eee;
      cursor:pointer;
      }

      </style>

      <?php get_header(); ?>
      <div class=”span-24″ id=”contentwrap”>
      <div class=”span-16″>
      <div id=”content”>

      <?php
      if (isset($_POST[tip]))
      $asoc=$_POST[tip];
      else
      $asoc=”112,113,114″;

      echo do_shortcode(“[mashup query='cat=".$asoc."' width='100%']“);
      ?>

      <fieldset>
      <legend>Filter form:</legend>

      Now :
      <font color=”red”>
      <label id=”infoText”>
      <?php
      if (!$_POST[infotip]==”)
      echo $_POST[infotip];
      else
      echo “Toate locatiile”;
      ?>
      </label>
      </font>
      <br>

      Check POI categories :
      <hr>
      <form name=”frm” method=”POST” action=””>
      <input id=”txtTip” type=”hidden” name=”tip” value=””>
      <input id=”infoTip” type=”hidden” name=”infotip” value=””>

      <label><input name=”c1″ type=”checkbox” value=”112″ onclick=”fa_text_asociatii (this);fa_text_final()”>Asociatii de pescuit
      <img src=’http://www.matchfishing.ro/wp-content/uploads/2013/01/rangerstation.png&#8217; height=’25’></label>
      <input id=”txtC1″ type=”hidden” name=”tc1″ value=””>
      <input id=”infoC1″ type=”hidden” name=”ic1″ value=””>

      <label><input name=”c2″ type=”checkbox” value=”113″ onclick=”fa_text_magazine (this);fa_text_final()”>Magazine de  pescuit
      <img src=’http://www.matchfishing.ro/wp-content/uploads/2013/01/conveniencestore.png&#8217; height=’25’></label>
      <input id=”txtC2″ type=”hidden” name=”tc2″ value=””>
      <input id=”infoC2″ type=”hidden” name=”ic2″ value=””>

      <label><input name=”c3″ type=”checkbox” value=”114″ onclick=”fa_text_stationar (this);fa_text_final()”>Piste de stationar
      <img src=’http://www.matchfishing.ro/wp-content/uploads/2013/01/water.png&#8217; height=’25’></label>
      <input id=”txtC3″ type=”hidden” name=”tc3″ value=””>
      <input id=”infoC3″ type=”hidden” name=”ic3″ value=””>

      <br><hr>

      <input type=submit value=”Filter”>

      </form>
      </fieldset>

      <script type=”text/javascript”>
      function fa_text_asociatii (checkbox) {
      if (checkbox.checked) {
      document.frm.tc1.value=112;
      document.frm.ic1.value=’- Asociatii de pescuit <br>’;
      }
      else {
      document.frm.tc1.value=”;
      document.frm.ic1.value=”;
      }
      }

      function fa_text_magazine (checkbox) {
      if (checkbox.checked) {
      document.frm.tc2.value=113;
      document.frm.ic2.value=’- Magazine de pescuit <br>’;
      }
      else {
      document.frm.tc2.value=”;
      document.frm.ic2.value=”;
      }
      }

      function fa_text_stationar (checkbox) {
      if (checkbox.checked) {
      document.frm.tc3.value=114;
      document.frm.ic3.value=’- Piste de stationar <br>’;
      }
      else {
      document.frm.tc3.value=”;
      document.frm.ic3.value=”;
      }
      }

      function fa_text_final() {
      document.frm.tip.value=document.frm.tc1.value+’,’+document.frm.tc2.value+’,’+document.frm.tc3.value;
      document.frm.infotip.value=document.frm.ic1.value+document.frm.ic2.value+document.frm.ic3.value;
      }

      </script>

      </div>
      </div>

      <?php get_sidebars(); ?>
      </div>
      <?php get_footer(); ?>

       

       

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.