I pull RSS feeds using the following code:
<div id="mcdougaldteens"> <script src="http://feeds.feedburner.com/dcl_mcdougald_teen?format=sigpro" type="text/javascript" ></script> </div>
This is a feed of upcoming events, and if there are no events that appear in the channel: "The channel providing these headers is unavailable."
I either want him to change the text to “No more events,” or just to completely hide the feed if the channel does not pull events.
I tried something like this without success:
<script type="text/javascript"> function hideEmptyRSS() { var el = document.getElementById("mcdougaldteens"); if(el.innerHTML == "The feed providing these headlines is not available.") { el.style.display = "none"; } else { el.style.display = "block"; } } </script>
I could use JavaScript, PHP or CSS. Any help would be appreciated.
source share