Home › Forums › MapPress Support › IE8 shows no POI list in mashup
- This topic has 8 replies, 2 voices, and was last updated 9 years, 11 months ago by
thedudem4n.
-
AuthorPosts
-
February 11, 2013 at 7:50 am #11638
Version:2.39.9
The map shows with all the points but the poi_list is not being displayed at all in the mashups (when i view the items individually it’s fine but the mashup is totally gone.It prints the <div id=mapp0_poi_list class=”mapp-poi-list” style=”width:100%”> and then nothing under it, the ul list is never printed. It works for IE9/firefox/chrome/safari though just not working in IE8
February 11, 2013 at 8:28 am #11639Hi,
Can you provide a URL illustrating the problem?
February 11, 2013 at 8:42 am #11640Bleh, it’s private. However I found the cause. I have javascript in map_poi_list.php (sorry forgot I appended it). It works on all browsers but IE8.
however removing the code and leaving the <script> tag still breaks it. Just having <script type=”text/javascript”></script> in there is breaking the IE8 list… any possible solution to this? I can just do feature jquery detection to hide the script from IE, but if the script is removed and it still doesn’t work not sure what to do.
February 11, 2013 at 8:56 am #11641Hi,
Maybe you could just output your script in the footer, rather than the poi list?
The list is actually generated and then moved to its container <div> when the map is displayed, so your script tag is ending up inside a <div> – something I guess IE8 doesn’t like.
There’s also an action that gets called when a map is displayed: mappress_map_display($map). It gets passed the entire map in ($map). You might be able to output your script tags there as well.
February 11, 2013 at 9:32 am #11642The reason I put it in map_poi_list was because I was unable to get the script to fire anywhere else, inline in the footer, in external js files, anywhere. once the map list is built I can’t manipulate any of it externally…
<script type=”text/javascript”>
$( “.mapLinks li” ).each(function(index) {
$(‘.lazyLoad’).hide();
if (index >= 20) {
$(this).hide();
$(‘.lazyLoad’).show();
}
});
</script>
I just want to hide the rest of the list since we have like 200 items and then put a button on the bottom to show the rest.
February 12, 2013 at 8:15 am #11650There’s also an action that gets called when a map is displayed: mappress_map_display($map). It gets passed the entire map in ($map). You might be able to output your script tags there as well.
How do I access that exactly? (not entirely understanding that bit would love to try it)
February 12, 2013 at 5:22 pm #11653Hi, there are ‘filters’ and ‘actions’ all over in WordPress (and in MapPress). You can use them to perform your own processing:
http://codex.wordpress.org/Function_Reference/add_action
In this case:
add_action(‘mappress_map_display’, myfunction)
Where ‘myfunction’ is your own function.
February 13, 2013 at 3:37 am #11658ahh. Totally forgot about appending functions.php, So I set up something simple but it’s getting an Ajax error any idea why?
add_action(‘mappress_map_display’, ‘hide_some_maps’);
function hide_some_maps() {
?><script type=”text/javascript”>
( function( $ ){
alert(‘test’);
} )( jQuery )
</script>
<?php
}
February 13, 2013 at 5:23 am #11660There was literally an extra DIV tag closing and it broke everything in IE8. all is good!!
-
AuthorPosts
- You must be logged in to reply to this topic.