Results 1 to 3 of 3

Thread: Help: Auto-refresh Ajax Tabs

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help: Auto-refresh Ajax Tabs

    1) Script Title: Ajax Tabs Content Script (v 2.2)

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

    3) Describe problem:
    - I got the Ajax Tabs works perfectly. Is there a way to auto-refresh/auto-update a DD ajax tab in a time interval?
    I currently has another ajax script to do this but it doesn't work with DD Ajax Tab script.
    Without DD script it ajax-auto-update the page content fine.

    - Here is my auto-update ajax script:
    <script type="text/javascript">
    self.setInterval("Ajax()", 3000);
    function Ajax() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp = new XMLHttpRequest();
    }
    else {// code for IE6, IE5
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
    document.getElementById("daily_data").innerHTML = xmlhttp.responseText;
    }
    }
    xmlhttp.open("GET", "daily.htm", true);
    xmlhttp.send();
    }
    </script>

    </head>

    <body onload="Ajax()">

    4) Thanks for your help!


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

    Default

    Have you read the following thread: http://www.dynamicdrive.com/forums/s...ad.php?t=16693
    DD Admin

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thank you. I should have looked more closely when I did a search on the forum.

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
  •