Re: RSS feed to integrate into Xara website
Quote:
Originally Posted by
garycwood84
Thanks, Acorn. I've added the code to the page head for the News page, where the RSS feed is, but it's still not working. Do I need to add anything else?
In TG, a space crept in, try:
<script>
window.onresize = function() {
//alert('Resizing!');
document.getElementById('rssfeed_frame').contentDo cument.location.reload(true);
};
</script>
To test, remove the //s and you will get nagged lots and probably not be able to resize across the Variants. I included this to check that the syntax of the code is correct.
Next remove the alert line altogether.
Fingers crossed.
Acorn
Re: RSS feed to integrate into Xara website
Thanks, Acorn. Still no luck, I'm afraid: I don't see the alerts or the refreshing. However, looking back through the thread, I noted this assumption, and wonder if it's the problem:
Quote:
I shall assume you will always have jQuery loaded.
I haven't deliberately done anything to load jQuery. Should I have done?
Re: RSS feed to integrate into Xara website
Quote:
Originally Posted by
garycwood84
Thanks, Acorn. Still no luck, I'm afraid: I don't see the alerts or the refreshing. However, looking back through the thread, I noted this assumption, and wonder if it's the problem:
I haven't deliberately done anything to load jQuery. Should I have done?
Gary, I checked and some of your other components already activated jQuery. I did, however, rewrite the code to omit any jQuery calls (using $), so it should work.
Is the alerting working at least?
Acorn
Re: RSS feed to integrate into Xara website
Thanks, Acorn.
Quote:
Originally Posted by
Acorn
Is the alerting working at least?
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?
Re: RSS feed to integrate into Xara website
Quote:
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
Re: RSS feed to integrate into Xara website
A variation:
Code:
document.getElementById('rssfeed_frame').contentWindow.location.reload();
Acorn
Re: RSS feed to integrate into Xara website
Thanks for this Acorn, and apologies for taking ages to get back to you: I got distracted by other work commitments, and so have only just had time to pick this up again.
Quote:
Originally Posted by
Acorn
Can you add a class of eng_feed to all your IFRAMES (class="eng_feed") and change the code to
I'm not sure where to put this. The code I've copied into a the placeholder on the site doesn't actually include an iFrame tag into which I could put this class. The site itself is now live, so you can see the relevant page at www.sela-sheffield.org/news.htm
Many thanks in advance for any further advice.