View Full Version : AJAX CARS W/Simplepie

08-28-2009, 12:50 AM
1) Script Title: Ajaxcars

2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm#combo

3) Describe problem:

I placed the ajax code on the page (or call it externally). The web page mainly css and has a header that happens to be a .jpg

I am using simplepie to call the feed so when I use:

<li><a href="javascript:ajaxpage('lib/cnnmarketwatch.php', 'content');">Credit crunch</a></li>

to a div called "output" on the page, the header .jpg is dragged along with it. For a while there I thought it was just me calling a dup web page however, the simplepie page is nothing but php, no styles at all.

If I call another simplepie page that does not use any php to retrieve images from the rss/xml feed everything appears to work fine

Am I to be doing something with the following lines of code in the Ajax Content?

var loadedobjects=""
var rootdomain="http://"+window.location.hostname


if (fileref!=""){
loadedobjects+=file+" " //Remember this object as being already added to page

Is this causing the Ajax to grab the .jpg from the header thinking it is part of the external file also?:confused:

08-28-2009, 01:23 PM
I believe what my problem was, that the "complete download link" available on the code page, was not the latest and greatest.. I copied the code located right on the example page and all seems well at this time. or it was my simplepie... I was tweaking both at the same time...

Now if I could only get them both to simply extrapolate only the image, and display those one at a time....

Great script by the way, thanks!!!!:eek: