Originally Posted by
garycwood84
Thanks, Acorn.
No, it doesn't seem to be working at all. I copied the code you sent and inserted it into the Head of the news page. I removed the forward slashes before the alert, and republished, but no alerts appeared.
Interestingly, I've noticed that as I resize down the window from the full size (960px) variant, the news feed disappears when I get to 960px and the site switches to the 700px variant. If I then refresh, the news feed reappears, but it doesn't disappear when I get to the 400px variant: it just resizes to be narrower and stays visible. I don't know what the difference is between the two break points that would cause this, unless it's the fact that the 400px variant has a different style sheet, and perhaps calling for that triggers the whole iframe to refresh?? Maybe a simple fix would be to give the 700px version it's own stylesheet too, even if it's contents are the same as the 960px one?
What do you think?
Gary, I can't see your page published at the moment but are all the Feeds using the same ID (rssfeed_frame)? JavaScript usually only latches onto the first instance of an ID so it might not be firing for the Variants.
Can you add a class of eng_feed to all your IFRAMES (class="eng_feed") and change the code to
Code:
<script>
window.onresize = function() {
document.getElemenstByClassName('eng_feed').contentDocument.location.reload(true);
};
</script>
After that it might still be down to where the code is place on each Variant page but I think the head is correct.
Acorn
Bookmarks