>>1. Make sure that the table you want to close/open has a unique name.

like <table id="fields">

-----Original Message-----
From: John Stanley 
Sent: Tuesday, March 25, 2003 11:31 AM
To: CF-Community
Subject: RE: Collapse Table


Sure,
1. Make sure that the table you want to close/open has a unique name.
2. Set the style="display: " to either none or empty_string (nothing)
depending on how you want the table to display initially.
3. Create a js function like the following:
function toggle_fields(){
                if (document.all.fields.style.display == "none"){
                        document.all.fields.style.display = "";
                }
                else{
                        document.all.fields.style.display = "none";
                }
        }

4. Have your button or whatever call this function on it's onClick event.

that should do it.

-----Original Message-----
From: Randell B Adkins [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 11:04 AM
To: CF-Community
Subject: Collapse Table


Does anyone know how to use JS to close table contents?

I have a few tables within a main table. If I click on
Close Table A, then Table A is closed but the rest 
remains shown. However a button should now show
to re-display Table A.

Any references anyone has to this is greatly appreciated.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
                                

Reply via email to