Results 1 to 7 of 7

Thread: Tab Content Script (rotation mod request)

  1. #1
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script (rotation mod request)

    1) Script Title: Tab Content Script

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

    3) Describe problem: Script actually works great, just wondered how I could get the tabs to rotate. After tinkering, I could get the actual tabs at the top to rotate, but the content never changed. Do you have any ideas on how I might do this? Thanks,

    Dan

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    By rotate, do you mean the order of the tabs themselves, or just the one that's selected by default? And by rotate, do you mean randomly each time the page loads?

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here's an example of what it's currently doing:

    http://64.4.170.250/tabmenu/test_index.shtml

    As you can see, the tabs rotate, but the content in the "body" of the page doesn't rotate. I've tried several configurations, but they don't work. I'm no javascript expert, so I could use some advise.

    Dan

  4. #4
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Also

    Here's another working example of the tabs. On this page, you have to click on the tabs for them to change. I'd like the rotating version to change the body content, as if "clicked" upon:

    http://64.4.170.250/tabmenu/index.shtml

    Dan

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hi Dan:
    I haven't studied your code close enough to know how you're automatically selecting the tabs perdiocially, but basically, in order to get the corresponding content to show, you need to call:
    Code:
    expandcontent(tablinkobject)
    each time, where tablinkobject is the reference to the tab link in question. If hardcoded inside the HTML, it would look something like:

    Code:
    <li><a href="#" rel="tcontent2" onClick="expandcontent(this)">Tab 2</a></li>
    Since "this" would reference the tab link itself.

    p.s: Your page is in violation of Dynamic Drive's usage terms, which, among other things, states that the credit notice inside script must stay intact within the page's source. Please reinstate the notice.

  6. #6
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hello

    Hi, I have a VERY similar script on my web site (www.frostzone.8k.com) and have the same problem. I would like the script to have tab one go to tab two automatically OR when clicked on by the visitor. I see that you have found a way to rotate the tabs with the following code:

    Code:
    }
    function rotateCats(){
    	if (index>=categories.length){
    		index = 0
    	}	
    	printtabs(categories[index])
    	index++
    	setTimeout("rotateCats()",3000)
    }
    However when that happens the body of the tab does not rotate also, therefore you must have to edit the tabs indivdually also. I have no idea about Javascript, trust me on that, but if you or anyone else has an answer I am patiently awaiting.

    -Conor

  7. #7
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    mfjobe or anyone-
    has there been any movement on this request? i have seen ESPN and MLB's sites offer a similar type design but with flash. i am not a flash fan, but would really like to have this content tab script be able to rotate the content on a 2-3 second delay basis. of course, an even better design will pause the rotation once the mouse pointer is hovering over the content.

    any help will be GREATLY appreciated.

    thanks,
    grant

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
  •