Home › Forums › MapPress Support › POI cat. filter
- This topic has 0 replies, 1 voice, and was last updated 10 years ago by
puck.
-
AuthorPosts
-
January 18, 2013 at 7:29 pm #11400
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=5507Thanks
<?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’ 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’ 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’ 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(); ?> -
AuthorPosts
- You must be logged in to reply to this topic.