View Full Version : Ajax Tabs Content Timer

06-02-2006, 04:04 PM
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.


06-02-2006, 11:08 PM
Use this:

function switchAjaxTab(id){
var theLink=document.getElementById(id)
ajaxpage(theLink.getAttribute("href"), theLink.getAttribute("rel"), theLink)

Call it like so:

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