PDA

View Full Version : AjaxTab html content



herbertscruffy
08-21-2007, 09:22 PM
1) Script Title: Ajax Tab Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I have the script itself working fine, but when it calls an external html page it won't display dynamic content.
example: http://www.si-mon.co.uk and click on the feeds tab.

I'm using the DD script with the feed im attempting to use, excellent i hasten to add. But the javascript just can't run inside my 'rel'. Is this a tab content problem or feed problem? great site.

ddadmin
08-22-2007, 06:10 AM
In cases where the JavaScript within the external page is executed on run time, using Ajax to fetch it won't work. What you can do is first create a blank HTML page (ie: externalpage.htm), then inside it, create a <iframe> tag that calls the desired external page with the dynamic content: (ie: dynamic.htm). Something like:


<iframe src="dynamic.htm" style="margin:0; padding:0; width:100&#37;; height: 100%"></iframe>

Then inside the Ajax Tabs script, have one of the tabs call externalpage.htm.

herbertscruffy
08-22-2007, 09:12 AM
Thanks for the reply but it doesn't seem to work, i'm using an example feed but even within the iframe the div won't show. the refresh link works, even the styled text works but the actual javascript is a no show.

The javascript error messages I get are;

gfeedfetcher.js (line 8)
google is not defined
google.load("feeds", "1") //Load Google Ajax Feed API (version 1)


dynafeed.htm (line 58)
newsfeed.addFeed is not a function
newsfeed.addFeed("BBC", "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/fron...

So it's having a hard time loading the feed because it isn't seeing google.load as a working function.
I'm bemused. I have links to the gfeedfetched in my 'dynamic.htm' aswell as my API key.

ddadmin
08-22-2007, 10:07 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.

herbertscruffy
08-22-2007, 10:11 AM
http://quantumlevel.co.uk/si-mon/

then as i'm using your ajaxtabs the content that isn't working is in the 'feeds' tab.

the content of the feeds tab is http://quantumlevel.co.uk/si-mon/feeds.html

herbertscruffy
08-22-2007, 07:49 PM
To add, I've been doing some hunting and it seems a few other people are having trouble with ajax calling other javascript.

http://www.webmasterworld.com/javascript/3391276.htm
Is the above link any help, I don't understand the work around that was used but it's certainly narrowed down the problem.

ddadmin
08-22-2007, 08:13 PM
You're confusing my instructions. :) Basically, all you need to do is make sure on your dynfeed.html page, the Feeds script works:

http://quantumlevel.co.uk/si-mon/dynafeed.htm

Right now, if you call this page in your browser, it doesn't, because the gAjax script isn't defined on it. Do that, and remove all the other redundant gAjax script references on the other pages. Once you get this page working, it will work within the Ajax tab content script, because it's being included as an iframe.

herbertscruffy
08-22-2007, 09:44 PM
finally got there, most appreciated. Thanks again DDAdmin