Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggle Expand button

Status
Not open for further replies.

MorganGreylock

Programmer
Jan 30, 2001
223
US
Hello all,

I would like to have a table of records, one per line showing very brief information. For example:

RecID Name Other field
1001 Bill abcdefg
1002 Sue 1233493983
1003 Joe 9349837837
1004 John kasjdhsjhds

And so forth. However, there is much more data for each of these records that is hidden in this view. I want the user to be able to click on an "Expand" button (would be the little Plus/Minus icon as used in some Windows apps, doesnt matter) to expand that record (or multiple records if they click on multiple expand icons) So then it might look like this:

1001 Bill abjhdfjdh
1002 Sue 989348383
Lots more details about sue's record
and some more details.
line 3 of details

1003 Joe 9349837837
1004 John kasjdhsjhds

I also plan to have an 'Expand All' and 'Collapse All' button. As I said before, I'd also want to make sure they
can expand multiple records at once, like if they wanted
to have both records 1001 and 1003 expanded at the same
time.

Does that make sense? I'm sure it can be done, but I really
don't know the best way to go about it, especially the
keeping track of which records have been expanded and which
aren't. I'd like to stay away from javascript if possible,
but if JS is necessary, I can deal with that.


Thanks in advance,
MG
 
If you do it server side you can just wrap a the extra information in a <cfif> to only display when certian url variables are present.

if you do it client side check out the javascript forum and ask them how to hide and show table rows with the click of a button.

Beware of programmers who carry screwdrivers.
 
I was thinking of doing that, but there might be 100s of records on a single page, and I didn't want to have 100 URL variables.

I suppose if I use a list of expanded records
"1001,1004,1010,1100" or something, I can use that to expand/contract the records in the table, while only having to use one URL variable (the list name).

Any comments/thoughts about that?

(And I'd rather do it server side too...)

Thanks,
MG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top