Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8651567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:06:14+00:00 2026-06-12T14:06:14+00:00

I am pulling RSS feeds in using the following code: <div id=mcdougaldteens> <script src=http://feeds.feedburner.com/dcl_mcdougald_teen?format=sigpro

  • 0

I am pulling RSS feeds in 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 the feed displays: “The feed providing these headlines is not available.”

I either want it to change the text to “No more events,” or just to hide the feed altogether if the feed is not pulling in events.

I’ve 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:06:15+00:00Added an answer on June 12, 2026 at 2:06 pm

    you missed indexOf on line 3:

    function hideEmptyRSS() {
        var el = document.getElementById("mcdougaldteens");
        if (el.innerHTML.indexOf("The feed providing these headlines is not available") > -1) {
            el.style.display = "none";
        }
        else {
            el.style.display = "block";
        }
    }
    

    EDIT

    ok, i just saw that the script creates another div inside yours.
    so you need to search for the text in the new element, but hide yours.
    like this:

    var el_mine = document.getElementById("mcdougaldteens");
    var el_theirs = document.getElementsByClassName('feedburnerFeedBlock');
    
    if (el_theirs[0].innerHTML.indexOf("The feed providing these headlines is not available") > -1) {
        el_mine.style.display = "none";
    }
    else {
        el_mine.style.display = "block";
    }
    

    test it here: http://jsfiddle.net/RASG/DqrT9/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which is Https, I am pulling some rss feeds using
So I got this code for pulling rss feeds from another website (i asked
I'm pulling an RSS feed from a remote location using ServerXmlHttp: Dim httpRequest set
Im pulling back images from youTube images like http://img.youtube.com/vi/9KPCO5ENlmw/0.jpg and what I see in
I am creating an android app which pulls in RSS Feeds from here http://spaceflight1.nasa.gov/realdata/sightings/cities/rss/index.cgi?country=United_Kingdom&region=England&city=Manchester
I intend to create a java program/service that continuously polls rss-feeds using the informa
I'm pulling some RSS feeds in from YouTube which have invalid UTF8. I can
Currently pulling out ma hair over the following problem. My code adds Rectangle s
I am pulling in an RSS feed using PHP. I get weird characters in
I have a class that I use for pulling in different RSS feeds on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.