SpaceCowboy
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
---or---
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(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:
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
---or---
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(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: