Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: TabContentScript- all showing up

  1. #1
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default TabContentScript- all showing up

    1) Script Title: Tab Content Script (v2.0)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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-L...ery-5-in-1.htm

    Any suggestions would be more than appreciated.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I don't see where your using the tabs.
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    The problem is that this file does not exist:

    Code:
    <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.

    Edit:
    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    [OFFTOPIC]How do you make the cool border around your posts?[/OFFTOPIC]
    Jeremy | jfein.net

  5. #5
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks for pointing that out. I renamed it and still get all the div's showing up until a tab is initialized.

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    [OFFTOPIC]How do you make the cool border around your posts?[/OFFTOPIC]
    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Oh, thanks...
    Edit: AWSOME
    Jeremy | jfein.net

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try changing this line:

    Code:
    info.setselectedClassTarget("linkparent") //"link" or "linkparent"
    to this:

    Code:
    info.setselectedClassTarget("link") //"link" or "linkparent"
    and add class="selected" to this section of code:

    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.
    Last edited by thetestingsite; 02-05-2008 at 11:29 PM.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.
    Last edited by Bribunk; 02-05-2008 at 11:32 PM.

  10. #10
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    Try changing this line:

    Code:
    info.setselectedClassTarget("linkparent") //"link" or "linkparent"
    to this:

    Code:
    info.setselectedClassTarget("link") //"link" or "linkparent"
    and add class="selected" to this section of code:

    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-L...ery-5-in-1.htm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •