Programmatically open/close TitlePane

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Programmatically open/close TitlePane

amerigo5
How do I dynamically or programmatically open and close the TitlePane using JavaScript?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically open/close TitlePane

Zenshai
Just did this myself, this probably isn't the best way to do it but it works.

function openPane(){
                var w=dojo.widget.byId("InsertIdHere");
                if (w.open) {}
                else {
                        w.onLabelClick();
                }
        }

Hope that helps.By the way with this you can use .css to hide the label and use a button (or something else) to open and close the pane.


amerigo5 wrote
How do I dynamically or programmatically open and close the TitlePane using JavaScript?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically open/close TitlePane

yogiam
In reply to this post by amerigo5
See the source of titlepane where the onclick hook is added. Just call that function in your javascript. Something like :

var tp = dojo.widget.byId("tp");
tp.functionWhichDojoCallsForOnClick();

Though i haven't seen the source, i feel its just simple toggling of the div tag, some style toggling like the wipein wipeout.

On 1/5/07, amerigo5 <[hidden email]> wrote:

How do I dynamically or programmatically open and close the TitlePane using
JavaScript?

Thanks.
--
View this message in context: http://www.nabble.com/Programmatically-open-close-TitlePane-tf2922961.html#a8170489
Sent from the Dojo mailing list archive at Nabble.com.

_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest



--
regards/Yogesh
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically open/close TitlePane

amerigo5
In reply to this post by amerigo5
var panetoggler  = 0;

function togglePane(paneid){
        var floatingpane = dojo.widget.byId(paneid);
       
        if (panetoggler == 0){
                floatingpane.show();
                panetoggler = 1;
        }
        else{
                floatingpane.hide();
                panetoggler = 0;
        }
}

amerigo5 wrote
How do I dynamically or programmatically open and close the TitlePane using JavaScript?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically open/close TitlePane

Sukesh K
This post has NOT been accepted by the mailing list yet.
In reply to this post by amerigo5
Use open property to show hide Titlepane

dijit.byId("testPane1").set('open',false); //Close

dijit.byId("testPane1").set('open',true); //Open