robn
Posts: 70
|
| Posted: 05/16/2006, 2:54 AM |
|
Hi all
One of the things I've been looking to do is create a record that could be very long but is broke up into sections. in order to keep the size of the form down to a minimum I want to be able to collapse all the section so only the section heading is displayed with a plus icon next to it. When the user clicks the plus icon the section is expanded to show the fields within that section. Also the plus icon changes to a minus icon so the section can be minimised.
Is this possible with CCS or would I have to create custom code?
many thanks in advance
Rob
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 05/16/2006, 4:52 AM |
|
Rob, this was done with very little custom code:
http://www.samusic.co.za/indexGigs.asp
check in the list under the search expand/collapse single or whole list
http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
Hope it helps
Theunis
|
 |
 |
robn
Posts: 70
|
| Posted: 05/16/2006, 8:31 AM |
|
TheunisP many thanks for your help
I can get the code working great on a single row, but I'm having trouble hiding several rows at once. I basically have a section within the record containing 4 rows each with 2 columns one containing the title and one containing a text area. When I try placing a div around this selection nothing appears to happen I'm unsure whether a div can work in this way or if I'm placing the div incorrectly?
any help would be much appeciated.
thanks again
Rob
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 05/16/2006, 9:32 AM |
|
maybe something with the tag id's and names - drop me the url of where the code is
|
 |
 |
marcwolf
Posts: 361
|
| Posted: 05/16/2006, 8:40 PM |
|
Don't use DIV's is your working in a table.
Try using TBody's and giving them an ID.
I did a few of these 'large forms' and have found that with a table the only way to hide a group of rows is to use a TBody tag.
Div's are fine for blocks of controls within a row thou.
Hope this helps
Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
|
 |
 |
robn
Posts: 70
|
| Posted: 05/18/2006, 4:05 AM |
|
Dave many thanks once again.
using <tbody id="sc3" class="switchcontent"> works like a treat.
The one thing I can't seem to resolve with the plus/minus code provided above is how to set the default to be contracted rather than expanded without using cookies?
many thanks again
Rob
|
 |
 |
robn
Posts: 70
|
| Posted: 05/23/2006, 2:30 AM |
|
Hi again
Please forget the part of my last message regarding start the page load with all sections contracted. I realized that this had already been provided by TheunisP in the link to switchcontent (not switchcontent2) which by default is set to contracted.
Thanks again to everyone for there help with this.
Rob
|
 |
 |