View Full Version : Tab Content Script (v 2.0) Issue

12-26-2007, 11:18 PM
1) Script Title: Tab Content Script (v 2.0)

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

3) Describe problem: Upon the initial design, it worked perfectly, then as I started filling in content, I noted that upon loading the page anytime after the first time (when cached, or even trying to force a refresh), the content from all my tabs is displayed on the first tab.

If I switch tabs and then switch back, the erroneous content doesn't appear. Likewise, if I refresh the page on a different tab, then switch to the first tab, nothing bad happens.

The code itself has not been altered. I'm working on the page locally, but you can see a snapshot here:

I'm sure it's just some mundane syntax error, but could someone take a peek? I apologize in advance for all the ridiculously long SELECT lists.

12-27-2007, 03:46 AM
I took a look, but nothing jumps out as the problem yet. Interestingly, if I save the web page locally (all files) and run that page, the script works without the issues above. That makes it harder to diagnose. Can you remove all the select lists, so the HTML within each tab content is kept to a minimum? This makes it easier to isolate what the problem is.

12-27-2007, 03:22 PM
I took out everything but a single sentence in each DIV (I thought maybe the complex table structure might have been breaking it) but it does the same thing:

Any thoughts?

12-27-2007, 03:36 PM
Well, I figured it out. It was a mundane syntax error.

My second and third tabs were:

<div id="equipment" class="shadetabs">
Test content on second tab.
...instead of...

<div id="equipment" class="tabcontent">
Test content on second tab.
Thanks for the help!