PDA

View Full Version : Creating a Collapsible Menu with Images/Tables?



thebigsadler
May 25th, 2005, 01:49 PM
I have searched and searched around the web and have yet to find anything besides layers (div's) to do what I want to do. I am trying to stay away from layers because of browser issues, java would be my ultimate preference.

I have found several tutorials on creatings text collapsible menus, but nothing that involves images. I have attached an image that should explain what I am trying to do. Realistically I only want 1 table to be open at a time (uncollapsed), but I showed 3 just for reference.

Any help you guys can provide would be great.

Jason

simplistik
May 25th, 2005, 02:08 PM
Exactly what browser issues? You can use JS, CSS, and DIVs to do this just fine... and make it cross browser easily. Basically all you're doing on load your gonna have the content div display = none, then on a click you'll have it display block... positioning is relative that way when you click on them it will push the one below it down. When you click another have a function that loops through your DIV IDs and if something's display is block then it will make it none and activate the one clicked. :P That's it in a nutshell, the reason I know this is cause me and .soulty did this about a month ago. I don't have the source files on this computer but if .soulty see's this post and is feeling generous I'm sure he'll post it. :D might want to PM the crap outta him though to make sure he responds :lol:

thebigsadler
May 25th, 2005, 02:50 PM
Firefox hates this so far.. it keeps showing the scroll bars.

petefs
May 25th, 2005, 08:58 PM
http://brothercake.com/site/resources/scripts/dbx/

Cybernoid
May 26th, 2005, 01:25 AM
Do it the way Simplistik says, Java sucks. Plus, when you do it properly, more people will see it than if you use Java.

thebigsadler
May 26th, 2005, 01:56 PM
Do it the way Simplistik says, Java sucks. Plus, when you do it properly, more people will see it than if you use Java.
He makes it sound easy enough, but I am completely lost when it comes to getting everything setup. For some reason or another, I tend to get lost really quickly in div's. If anyone who finds this easy could whip something up real quick for me, I would be very grateful.

I checked out the DBX stuff and it just seems overly complicated, plus I need to keep the scrollability factor in the open menu.

petefs
May 28th, 2005, 01:18 PM
Well, it's not going to write itself for you ; ) All it takes for the setup on DBX is properly formed (X)HTML, CSS, and a simple JS configuration. There are a total of four pages to be read. If you want scrolling within the open menu, just use overflow: scroll : )

Or, as simp says, "ask" (PM the crap out of) .soulty for the script they wrote :b

simplistik
May 28th, 2005, 01:21 PM
Hhehe... LoL... well actually I think this has been solved for the most part. I sent him the script and walked him through it so he should be good to go. Whenever .soulty releases his site... the script will be made public.

petefs
May 29th, 2005, 01:43 AM
You're a saint ^_^