PDA

View Full Version : Switch Content II body onload problem



schickster
02-24-2006, 02:23 PM
Hi All,

Can anyone out there tell me how to hide all DIVS on my page with the Switch Content II script in the body onload event? I keep getting an error telling me that 'ccollect' is not defined. If I do a typeof check then I get the same error for 'statecollect'.

I don't care if the page remembers where the expand or contract state was, I just want to contract all when the page loads but still have the ability to expand contract through the click event (which works great as of right now).

Any help would be very much appreciated.


....Frustrated....

jscheuer1
02-24-2006, 04:53 PM
Simple method:

http://www.dynamicdrive.com/forums/showthread.php?t=4842

More complex but less jumpy method:

http://www.dynamicdrive.com/forums/showthread.php?t=6242

ronan
11-14-2006, 01:14 PM
just registered to say thanks for posting that reply, really helped me out. as you can guess im no expert with javascript!