I have an RSS feed that is called using javascript. What I would like to happen is that the information gets displayed as html when you view source instead of the javascript.

Here's the javascript:

<script type="text/javascript" onload="$('div.rssBody').vTicker();">
$(document).ready(function () {
	$('#ticker1').rssfeed('http://feeds.bbc.co.uk/iplayer/highlights/tv',{}, function(e) {
		$(e).find('.homepageupdates').vTicker();

	});
});
</script>

<div id="ticker1"></div>

I'm guessing there is some php function that will be able to extract the info from this the source before the javascript gets to it.

Any help greatly recieved. Thank you

am I right that you are looking for a php rss parser?
there are alot of them
here is a short list
but there are many more (google)

Right ok, I have a parser now and I'm using wordpress. The parser uses shortcodes so I now need to integrate the shortcode into the javascript.

The javascript code is the same as above and needs to have this short code in it:

[parse_feed feed="http://feeds.bbc.co.uk/iplayer/highlights/tv" num="8" ]

I have tried this:

<script type="text/javascript">
$(document).ready(function () {
	$('#ticker1').rssfeed(<?php echo do_shortcode('[parse_feed feed="http://feeds.bbc.co.uk/iplayer/highlights/tv" num="8" ]'); ?>,{}, function(e) {
		$(e).find('div.rssBody').vTicker();
	});
});
</script>

But this isn't working!

Thanks for any help anyone can give. Thanks for the parser suggestion too!!

This plugin only gets the title from the feed whereas the other feed get the date and the first part of text in each feed article. But that is what I'm trying to achieve!! Thanks for your help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.