Combine your two Show...Feed functions so that you need only one 
google.setOnLoadCallback call. I would guess that one of the functions isn't 
being called because it's being overridden by the other.

Also, for future reference, please post a link to your page, working or not, 
rather than pasting code into the group. Groups is notorious for mangling code 
(e.g., by wrapping lines), and human eyes are not nearly as good at catching 
bugs as web browsers with debugging tools.

Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:
[email protected]

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

On Mar 25, 2012, at 2:24 AM, Tod wrote:

> I have a Google Feeds script that is working well in Chrome and IE9,
> however only part of it works in IE 8 or less.
> 
> The script basically repeats itself with slight changes in order to
> post to two different DIV tags with different queries on the feed
> categories.  I'm guess that there is a repeat of language that the
> browser is having trouble with and is not passing the data on properly
> in the second part of the script.
> 
> Can anyone tell me why in IE 8 or less the second part of the script
> is not posting?  A full version of the script in a test HTML page is
> located at:
> http://www.edgeworksclimbing.com/test.html
> 
> This script is as follows:
> <script type="text/javascript" src="/js/jquery-
> ui-1.8.16.custom.min.js"></script>
> <script type="text/javascript" src="https://www.google.com/jsapi";></
> script>
> 
> <script type="text/javascript">
>    google.load("feeds", "1");
>    google.setOnLoadCallback(ShowBlogFeed);
>       google.setOnLoadCallback(ShowEventFeed);
>       String.prototype.truncate = function(to_length){
>               if(to_length >= this.length)return this;
>               return this.substring(0, to_length-3)+'...';
>               }
>       function ShowBlogFeed() {
>      var feed = new google.feeds.Feed("http://edgeworksclimbing.com/
> blog/feed/");
>         feed.setNumEntries(10);
>      feed.load(function(result) {
>        if (!result.error) {
>                 var container = document.getElementById("blog-headline");
>          for (var i = 0; i < result.feed.entries.length; i++) {
>            var entry = result.feed.entries[i];
>            var date = new Date(entry.publishedDate);
>                       date = date.toDateString().substr(4);
>                       var blogcategory = entry.categories;
>                       if(blogcategory != "Events") {
>                               var li = document.createElement("li");
>                               li.className = "rss-item";
>                               li.innerHTML = '<a class="rss-item" href="' + 
> entry.link + '"
> target="_self">' + entry.title + '</a><br>';
>                               li.innerHTML += '<a class="rss-date" href="' + 
> entry.link + '"
> target="_self">' + date + '<cite class="rss-author"> by ' +
> entry.author + '</cite></a><br>';
>                               li.innerHTML += '<a class="rss-snippet" href="' 
> + entry.link + '"
> target="_self">' + entry.contentSnippet.truncate(60) + '</a>';
>                               container.appendChild(li);
>                       }
>          }
>        } else {
>                       var container = 
> document.getElementById("blog-headline");
>                   container.innerHTML = '<li><a href="http://
> www.edgeworksclimbing.com/blog">Edgeworks Blog</a></li>';
>               }
>      });
>    }
>    function ShowEventFeed() {
>      var feed = new google.feeds.Feed("http://edgeworksclimbing.com/
> blog/feed/");
>         feed.setNumEntries(10);
>      feed.load(function(result) {
>        if (!result.error) {
>                 var container = document.getElementById("event-headline");
>          for (var i = 0; i < result.feed.entries.length; i++) {
>            var entry = result.feed.entries[i];
>            var date = new Date(entry.publishedDate);
>                       date = date.toDateString().substr(4);
>                       var eventcategory = entry.categories;
>                       if(eventcategory.indexOf("Events") != -1) {
>                               var li = document.createElement("li");
>                               li.className = "rss-item";
>                               li.innerHTML = '<a class="rss-item" href="' + 
> entry.link + '"
> target="_self">' + entry.title + '</a><br>';
>                               li.innerHTML += '<a class="rss-snippet" href="' 
> + entry.link + '"
> target="_self">' + entry.contentSnippet.truncate(60) + '</a>';
>                               container.appendChild(li);
>                       }
>          }
>        } else {
>                       var container = 
> document.getElementById("event-headline");
>                   container.innerHTML = '<li><a href="http://
> www.edgeworksclimbing.com/blog">Edgeworks Blog</a></li>';
>               }
>      });
>    }
> </script>
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Google AJAX APIs" group.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> To view this message on the web, visit
> http://groups.google.com/group/google-ajax-search-api?hl=en_US
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
http://groups.google.com/group/google-ajax-search-api?hl=en_US
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

Reply via email to