Results 1 to 6 of 6

Thread: tabbed content menu - font colors

  1. #1
    Join Date
    Jan 2006
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Arrow tabbed content menu - font colors

    Hi All.

    script: Tab Content Script
    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    I have it setup here: http://test.oshernet.co.il/events/ev...asp?simID=9870 (this is a Hebrew site, but you will be able to see it, i am confident!)

    note when you go through the tabs, the previously clicked tabs, their font stays black, instead of going back to white.

    can anyone take a look please and see why?

    many thanks in advance!
    Sn

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I see you've already made some modification to this function, add the changes shown below in red and it should do the trick:

    Code:
    function highlighttab(aobject){
    if (typeof tabobjlinks=="undefined")
    collecttablinks()
    for (i=0; i<tabobjlinks.length; i++){
    tabobjlinks[i].style.backgroundColor=initTabcolor
    tabobjlinks[i].style.color='white'
    }
    var themecolor=aobject.getAttribute("theme")? aobject.getAttribute("theme") : initTabpostcolor
    aobject.style.backgroundColor=themecolor
    aobject.style.color='#000066'
    //aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Arrow

    excellent, thank you for the help - i had forgotten about that change

    another thing: (maybe also because of a change of mine?) - when i have a tab that loads by default - the tab doesnt go to the 'over' style.

    scenario:

    load this page: http://test.oshernet.co.il/events/ev...sp?simID=10623

    click on the 'tab' 2nd from the left - in the content that opens - you will see a text field - enter anything.
    and then click that button.

    that is the tab that should open by default (instead of the the one 4th from the right).
    and indeed - the correct content ID opens. BUT - the correct tab doesnt isnt on the "active" style.


    many thanks, once again!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It looks like you are using &tab=gb in the address to pass the initial tab to the new page. However, the tab number is still 1. As things go from right to left on your pages rather than left to right as I am used to seeing, I am not sure what the correct number to pass would be but I think it would be 3. In any case, however you have devised to pass the gb and get it to appear here:

    Code:
    var initialtab=[1, "gb"]
    in the source, you probably also need to pass that number 3 (or whatever it actually needs to be), something like:

    &tab=gb&tabn=3

    to have the above code appear as:
    Code:
    var initialtab=[3, "gb"]
    I cannot test this as I could the previous solution but, from what I know about this script, it should take care of it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2006
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you, John, much appreciated.
    i will try this, and report back here.

  6. #6
    Join Date
    Jan 2006
    Posts
    50
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    hi - just to report back, - you were correct.
    i am still working on it to perfect it, because some of the tab content is dynamic, but you pointed me in the right direction.

    thanks again for all the help.

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
  •