Another approach might do what you are after:

document.all.main1.style.display = "none"; to hide the div,
document.all.main1.style.display = "block"; to show the div

Unless you have a specific reason for not using the Display style.

I've done this extensively on my current project with no problems (except
coder errors of course).

HTH

Shawn Grover

-----Original Message-----
From: Bruce, Rodney S HQISEC/SIGNAL
[mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 2:08 PM
To: CF-Talk
Subject: RE: <DIV> question 


but doesn't

If I just hide the main the subs are still visible :(

function hide(){
        
        document.all.main1.style.visibility= 'hidden';
        
        document.all.main2.style.visibility= 'visible';
        }

Do I need to add something in the <div>?



-----Original Message-----
From: Cravens, Billy [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 12:48 PM
To: CF-Talk
Subject: RE: <DIV> question 


Should work - nested elements should inherit the properties of the
parent.

---
Billy Cravens
 

-----Original Message-----
From: Bruce, Rodney S HQISEC/SIGNAL
[mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 10, 2002 2:17 PM
To: CF-Talk
Subject: OT: <DIV> question 

Hello all

Was wondering if it was possible for <div>s to be subs to each other.

Like if the main div is hidden the subs will be as well without having
to
hide each one.

example:

<DIV name="main1">
        <DIV name="sub1main1"></div>
        <DIV name="sub2main1"></div>
</div>

<Div name="main2">
        <DIV name="sub1main2"></div>
        <DIV name="sub2main2"></div>
</div>


currently I can hide all three:

function hide(){
        
        document.all.main1.style.visibility= 'hidden';
        document.all.sub1main1.style.visibility= 'hidden';
        document.all.sub2main1.style.visibility= 'hidden';
        
        document.all.main2.style.visibility= 'visible';
        document.all.sub1main2.style.visibility= 'visible';
        document.all.sub2main2.style.visibility= 'visible';
        }


but I was hoping it might be possible to hide the subs just by hiding
the
main.


Thanks for any help
Rodney



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to