ContentPane Visibility

3200
2
10-05-2012 10:04 PM
Town_ofSnowflake
Occasional Contributor
I'd like a ContentPane to be hidden on page load, then make it visible dynamically when a particular event is triggered. I'm trying to complete this only using Dojo.

...  seems like it should be relatively easy, but I can't figure it out.
0 Kudos
2 Replies
StephenLead
Regular Contributor III
I'd like a ContentPane to be hidden on page load, then make it visible dynamically when a particular event is triggered


One approach could be to set the content pane's CSS to display: none; by default, then modify it inside the event:

dojo.connect(element, "event", function(evt) {  document.getElementById("contentPaneId").style.display = 'block';
});


Steve
0 Kudos
Town_ofSnowflake
Occasional Contributor
Hi Steve-

I've done exactly this.  Within the HTML, when I declare the div:
<div id="attribcent" dojotype="dijit.layout.ContentPane" region="right" style="display: none">



Then, when the method is called, I have this line within the method:

document.getElementById("attribcent").style.display = 'block';
0 Kudos