Sure Jeremy,
Basically, my html file loads the dynamicfeedcontrol.js from an external
file (I just copied the google code and customized it a bit - you actually
helped me with that) and then I load the feeds in the header like this:
<script type="text/javascript">
google.load('feeds', '1');
function OnLoad() {
var feeds = [
{
title: ' ',
url: 'http://pragcap.com/feed'
}
];
var options = {
stacked : true,
horizontal : false,
numResults: 6,
displayTime : 500000,
title : "Pragmatic Capitalism"
};
new GFdynamicFeedControl(feeds, 'content1', options);
document.getElementById('content1').style.width = "300px";
}
google.setOnLoadCallback(OnLoad);
</script>
<script type="text/javascript">
google.load('feeds', '1');
function OnLoad() {
var feeds = [
{
title: ' ',
url: 'http://feeds.feedburner.com/zerohedge/feed'
}
];
var options = {
stacked : true,
horizontal : false,
numResults : 6,
displayTime : 500000,
title : "Zero Hedge"
};
new GFdynamicFeedControl(feeds, 'content2', options);
document.getElementById('content2').style.width = "300px";
}
google.setOnLoadCallback(OnLoad);
</script>
Basically, my header is loaded with roughly 50 of these separate feeds. I
load them like this because I want to display each div in a separate
container, not all of them in the same feed. So when I wanted to move all
these scripts into an external file (and remove all the script opening and
closing tags) it doesn't work - the website only loads the last feed at the
bottom of the external file. I'm sure this is exactly like what you
mentioned - a problem with loops. How can I successfully load all the
different feeds externally? Thank you in advance, you are a great help.
On Thursday, 15 August 2013 08:28:40 UTC-4, jgeerdes [AJAX APIs "Guru"]
wrote:
> You can load any JS you want from an external file. The issue with loading
> the last feed only sounds like you're trying to load everything in a loop
> and overriding previous loops. Post a link, and we'll take a look.
>
> jg
>
> On Wed, Aug 14, 2013 at 11:28 PM, onenak <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> Sorry if this is a stupid question. I know that you can load the source
>> code for the dynamic control feed in a separate file, but what about the
>> actual code that loads it? You know, the whole "google.load('feeds', 1) etc
>> stuff. I have tons of feeds sitting in my html file and I fear it will
>> really bog down my site once it gets more traffic. I tried putting them all
>> in an external js file and calling it, but the feed at the bottom of the
>> external file was the only one to load.... any suggestions?
>>
>> --
>> --
>> 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] <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> To view this message on the web, visit
>>
>> https://groups.google.com/d/msgid/google-ajax-search-api/be0a0702-6658-40f3-8094-e115176e64d6%40googlegroups.com
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected]<javascript:>
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Jeremy R. Geerdes
> Generally Cool Guy
> Des Moines, IA
>
> If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan
> Church!
> http://www.debraheightswesleyan.org
>
--
--
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
https://groups.google.com/d/msgid/google-ajax-search-api/b39d014d-ea66-45c0-becc-8d1e08b231fd%40googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.