Results 1 to 8 of 8

Thread: AjaxTab html content

  1. #1
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post AjaxTab html content

    1) Script Title: Ajax Tab Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    <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.

  3. #3
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    Last edited by herbertscruffy; 08-22-2007 at 09:40 AM. Reason: revised response

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.

  5. #5
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  8. #8
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    finally got there, most appreciated. Thanks again DDAdmin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •