PDA

View Full Version : Tab Content Script (rotation mod request)



mfjobe
09-05-2006, 01:49 PM
1) Script Title: Tab Content Script

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

3) Describe problem: Script actually works great, just wondered how I could get the tabs to rotate. After tinkering, I could get the actual tabs at the top to rotate, but the content never changed. Do you have any ideas on how I might do this? Thanks,

Dan

ddadmin
09-05-2006, 06:53 PM
By rotate, do you mean the order of the tabs themselves, or just the one that's selected by default? And by rotate, do you mean randomly each time the page loads?

mfjobe
09-05-2006, 07:27 PM
Here's an example of what it's currently doing:

http://64.4.170.250/tabmenu/test_index.shtml

As you can see, the tabs rotate, but the content in the "body" of the page doesn't rotate. I've tried several configurations, but they don't work. I'm no javascript expert, so I could use some advise.

Dan

mfjobe
09-05-2006, 07:29 PM
Here's another working example of the tabs. On this page, you have to click on the tabs for them to change. I'd like the rotating version to change the body content, as if "clicked" upon:

http://64.4.170.250/tabmenu/index.shtml

Dan

ddadmin
09-06-2006, 06:38 AM
Hi Dan:
I haven't studied your code close enough to know how you're automatically selecting the tabs perdiocially, but basically, in order to get the corresponding content to show, you need to call:


expandcontent(tablinkobject)

each time, where tablinkobject is the reference to the tab link in question. If hardcoded inside the HTML, it would look something like:


<li><a href="#" rel="tcontent2" onClick="expandcontent(this)">Tab 2</a></li>

Since "this" would reference the tab link itself.

p.s: Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, states that the credit notice inside script must stay intact within the page's source. Please reinstate the notice.

Frostzone
09-24-2006, 04:44 PM
Hi, I have a VERY similar script on my web site (www.frostzone.8k.com) and have the same problem. I would like the script to have tab one go to tab two automatically OR when clicked on by the visitor. I see that you have found a way to rotate the tabs with the following code:


}
function rotateCats(){
if (index>=categories.length){
index = 0
}
printtabs(categories[index])
index++
setTimeout("rotateCats()",3000)
}

However when that happens the body of the tab does not rotate also, therefore you must have to edit the tabs indivdually also. I have no idea about Javascript, trust me on that, but if you or anyone else has an answer I am patiently awaiting.

-Conor

rgsummerlin
09-02-2007, 10:50 PM
mfjobe or anyone-
has there been any movement on this request? i have seen ESPN and MLB's sites offer a similar type design but with flash. i am not a flash fan, but would really like to have this content tab script be able to rotate the content on a 2-3 second delay basis. of course, an even better design will pause the rotation once the mouse pointer is hovering over the content.

any help will be GREATLY appreciated.

thanks,
grant