Results 1 to 2 of 2

Thread: Ajax Tabs Content Timer

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Tabs Content Timer

    I have been using the ajax tabs content script. It works really well and I like it alot.

    There is one problem with the script that I am trying to solve that doesn't have anything to do with the functionality of the script itself.

    I want to be able to move from one tab to another every 10 seconds. Similiar to what you see on the http://www.aol.com.

    This is really easy to implement in Internet Explorer because IE provides a click method on an anchor tag. So to move between tags in IE you provide an id to all of the anchor tag elements for the tabs and use the JavaScript setTimeout to call a function with the following line of code:

    document.getElementByID(ID of the Anchor you want to move to).click;

    I am looking for a way to do something similiar in firefox.

    Unfortunately I am working on a development server and can't provide a link to the forum.

    Thanks for any help.

    Rich

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Use this:

    Code:
    function switchAjaxTab(id){
    var theLink=document.getElementById(id)
    ajaxpage(theLink.getAttribute("href"), theLink.getAttribute("rel"), theLink)
    loadobjs(theLink.getAttribute("rev"))
    }
    Call it like so:

    switchAjaxTab('ID of the Anchor you want to move to')
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •