PDA

View Full Version : Dynamic Content: Switch Content II Help :)



Kayla
09-08-2005, 10:20 AM
http://www.dynamicdrive.com/dynamicindex17/switchcontent2.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!

ubh
09-08-2005, 06:03 PM
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. :D

bmk1st
09-22-2005, 07:12 PM
http://www.dynamicdrive.com/dynamicindex17/switchcontent2.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/dynamicindex17/switchcontent.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?

jscheuer1
09-22-2005, 09:49 PM
Find this function and add the part in red to it as shown:

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')
}

bmk1st
09-23-2005, 12:19 PM
That's pretty simple.

Thank you for your help!