View Full Version : Tab Content Script

09-25-2007, 08:45 AM
1) Script Title: Tab Content Script

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

3) Describe problem:
I use Tab Content Script, it works great! Except, I can't get the javascripts inside the divs to work. I have both a small mootools effect thing and a validation library that should be loaded. But non of these works inside a tab, or a div so to speech.

Is it possible to use the tabs with other javascripts? If so, do you have a hint, I have tried everything. To load the javascriptsfiles inside the divs. But nothing works.

I have also tried the ajaxtabs but that is'nt what I want.

Regards, Patrik

09-25-2007, 09:02 AM
It should work, as all that Tab Content script does is toggle the visiblity of a DIV when a tab is clicked on. What's embedded inside these DIVs are loaded along with the rest of the page from the start.

Now, if you're talking about Ajax Tabs content script, in which the DIVs' contents are dynamically fetched, you may need to resort to using IFRAMEs, per this thread: http://www.dynamicdrive.com/forums/showthread.php?t=24096

09-25-2007, 09:49 AM
hmm. thats wierd.

I'm not talking about the Ajax Tabs content script.

Maby it can help if I tell you how I built everything up.

First I have "template file". admin.php

thats where I have the design and so on. Then I include files into admin.php.

For example, edit.php where I use Tab Content Script. And its in edit.php I have this one:
<script language="javascript" type="text/javascript" src="../includes/lib/tabs/tabcontent.js"></script>

It works, and it is in admin.php I include the rest of the javascript that is used on every page. For example, the validation library. But these does'nt work in the pages where I use tabs.

Could it be some kind of trubble between javascripts?

Thanks for the reply!

Regards, Patrik