Results 1 to 5 of 5

Thread: Dynamic Content: Switch Content II Help :)

  1. #1
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic Content: Switch Content II Help :)

    http://www.dynamicdrive.com/dynamici...chcontent2.htm

    Does anyone know how to make all the content minimized as soon as the user goes to the page?

    I love the features of this script except for this part..
    I know the script page does say this one is for showing the user all content at first.. so they can choose what they want to hide, but this is just a little too much to handle
    http://www.surpasshosting.com/serversnew.php



    I would just use Switch Content I but.. I want to use Switch Content II since it works with FF, IE and Opr.

    Any help is appreciated!

  2. #2
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I too am haveing the same Issue with switcher content I, hehe and would love to figure this one out.. please anyone?

    ps: anyone else notice he miss spelled between in "Difference betwen Java & JavaScript?" hehe now im scared.
    Last edited by ubh; 09-08-2005 at 06:07 PM.

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

    Default

    Quote Originally Posted by Kayla
    http://www.dynamicdrive.com/dynamici...chcontent2.htm

    Does anyone know how to make all the content minimized as soon as the user goes to the page?
    I would like to know if anybody has done this.

    I've read javascript codes and it doesn't collapse the content when the page loads for first time, so I tried to read codes from http://www.dynamicdrive.com/dynamici...tchcontent.htm
    and I don't think I can use some of these codes to get it to work with Switch Content II.

    Does anybody think it's possible to get Switch Content II to collapse when it loads first time?

  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

    Find this function and add the part in red to it as shown:
    Code:
    function do_onload(){
    uniqueidn=window.location.pathname+"firsttimeload"
    var alltags=document.all? document.all : document.getElementsByTagName("*")
    ccollect=getElementbyClass(alltags, "switchcontent")
    statecollect=getElementbyClass(alltags, "showstate")
    if (enablepersist=="on" && get_cookie(window.location.pathname)!="" && ccollect.length>0)
    revivecontent()
    if (ccollect.length>0 && statecollect.length>0)
    revivestatus()
    sweeptoggle('contract')
    }
    - John
    ________________________

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

  5. #5
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That's pretty simple.

    Thank you for your 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
  •