PDA

View Full Version : TabContentScript- all showing up



Bribunk
02-05-2008, 10:48 PM
1) Script Title: Tab Content Script (v2.0)

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

3) Describe problem:

I have modified the original script and tailored it to my website but somewhere along the way I made a mistake and now when a page is first loaded, all the DIV's show up until one of the tabs are initialized. I was wondering if anyone has any suggestions. I have posted a test page as an example. It can be found here:
http://www.palapastructures.com/PS-Local/photogallery-5-in-1.htm

Any suggestions would be more than appreciated.

Nile
02-05-2008, 10:55 PM
I don't see where your using the tabs.

thetestingsite
02-05-2008, 10:59 PM
The problem is that this file does not exist:



<script type="text/javascript" src="js/tabcontent.js">

/***********************************************
* Tab Content script v2.0- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>


Place the correct path to the file or re-upload the original file to that specified location.


Found that the file is there, just in the JS folder (notice caps used here, but not in your path). You can either fix that in the code I posted above, or you can simply rename the folder to lowercase.


hope this helps.

Nile
02-05-2008, 11:05 PM
How do you make the cool border around your posts?

Bribunk
02-05-2008, 11:05 PM
Thanks for pointing that out. I renamed it and still get all the div's showing up until a tab is initialized.

thetestingsite
02-05-2008, 11:08 PM
How do you make the cool border around your posts?
What do you mean? Do you mean the edit that I just put in there? If so, simply use [EDIT] tags and it will do the rest.

Hope this helps.

Nile
02-05-2008, 11:10 PM
Oh, thanks...
AWSOME

thetestingsite
02-05-2008, 11:23 PM
Try changing this line:



info.setselectedClassTarget("linkparent") //"link" or "linkparent"


to this:



info.setselectedClassTarget("link") //"link" or "linkparent"


and add class="selected" to this section of code:



<div id="iteminfo" class="indentmenu">
<ul>
<li><a href="#" rel="tcontent1" class="selected">1</a></li>
<li><a href="#" rel="tcontent2">2</a></li>
<li><a href="#" rel="tcontent3">3</a></li>
<li><a href="#" rel="tcontent4">4</a></li>
<li><a href="#" rel="tcontent5">5</a></li>
</ul>
</div>

Hope this helps.

Bribunk
02-05-2008, 11:25 PM
I linked up the javascript page, that was just a side problem. I still have the problem that all the DIV's are showing up when the page is first loaded.

Bribunk
02-05-2008, 11:32 PM
Try changing this line:



info.setselectedClassTarget("linkparent") //"link" or "linkparent"


to this:



info.setselectedClassTarget("link") //"link" or "linkparent"


and add class="selected" to this section of code:



<div id="iteminfo" class="indentmenu">
<ul>
<li><a href="#" rel="tcontent1" class="selected">1</a></li>
<li><a href="#" rel="tcontent2">2</a></li>
<li><a href="#" rel="tcontent3">3</a></li>
<li><a href="#" rel="tcontent4">4</a></li>
<li><a href="#" rel="tcontent5">5</a></li>
</ul>
</div>

Hope this helps.


I just did this and the whole tab function stopped working. Check it out:
http://www.palapastructures.com/PS-Local/photogallery-5-in-1.htm

Bribunk
02-06-2008, 12:00 AM
Thanks y'all. I figured out that the onpage javascript has to be outside the last DIV bracket!