View Full Version : Tab Content Script Option When Javascript is Disabled

03-18-2006, 08:37 PM
I like the Tab Content Script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) but I am wondering can it be adjusted to default to show the information in the first tab if a user has javascript disabled?

The reason I bring this up is that I have been looking at the new test front page that Yahoo (http://events.yahoo.com/326123171.html) has been delivering and the middle of their new site has a couple of content tab areas. I was playing around with turning off the javascript on my browser and was surprised to see that the content of the first tabbed item remains even when javascript is turned off. For the other tabs clicking on these will send you to a linked page.

I can't seem to get the Tab Content Script to show the first tab's content when javascript is turned off. I can get the other tabs to link to other pages so that part works.

Any suggestions would be helpful.

03-18-2006, 08:43 PM


03-18-2006, 10:56 PM
Great - I was close with the {display: block} but didn't have the class right.

03-20-2006, 02:43 PM
One more question on this script - is it possible for the tab background color to be different from the entire content container color? I can change the background color behind each <li> item in the tab content container but I'd like to have the whole background of the container be a different color than the tab background color. Entering a background color in #tabcontentcontainer seems not to work as it is overridden by the current class and if I disable the current class it also does not seem to work.

03-20-2006, 04:44 PM
This line here:

document.getElementById("tabcontentcontainer").style.backgroundColor = "red"; // Change the colour as you like.

03-21-2006, 03:19 PM
Thanks - I'll give this a try.

05-18-2006, 03:45 PM
Hello Everybody

Can I add 2 or more Tab Content Script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) on the same page?

I am using one in my home page, but I want to include two or more scripts.

Thanks a lot for your help


05-18-2006, 04:26 PM
Totally unrelated to the thread.