Unable to close and reopen Floating Panel using Dojox

Discussion created by SHarihar-esristaff Employee on Sep 22, 2012
Latest reply on May 9, 2016 by davidchrest
I am trying to open a floating panel, using onClick event, it opens fine but shows this error in the console, `this.onClick is not a function`.

If I close the floating panel and then try to a reopen, it won't open again and I keep receiving the same error in the console.

This is my application. You can see a floating panel emerge when you click on the `Layers` button in the toolbar.

This is the main function that is opening the FLoating Panel,

    function addFloatingPanel() {
        var fp = new dojox.layout.FloatingPane({
            title: "Layers",
            resizeable: true,
            dockable: false,
            closable: true,
            style: "position:absolute; top:0; left:50px; width:245px; height: 175px; z-index: 100; visibility: hidden;",
            id: 'floater'
        }, dojo.byId('floater'));
        if (dojo.byId('floater').style.visibility === 'hidden') {
        } else {
            dojo.byId('floater').style.visibility = 'hidden'

Where am I going wrong? Also, the floating panel is visible in firefox but not in chrome!!