Loading ...
Sorry, an error occurred while loading the content.

Two issues regarding panels

Expand Messages
  • bigodines
    Hello, I m creating a dynamic help window using panels and the connection manager. I ve been facing two problems: 1 - I need to render() it twice because its
    Message 1 of 1 , Jan 4, 2008
    • 0 Attachment
      Hello,

      I'm creating a dynamic help window using panels and the connection
      manager. I've been facing two problems:

      1 - I need to render() it twice because its dynamic. If I render
      inside the callback function, my panel disapears (it is created and
      then it desapears). If I render outside the callback function, my
      panel appears without body. So I'm calling render() twice to make it
      work (there is probably a better way to make it work).

      2 - As my help window will have a variable size, I cannot make the
      overflow: auto to show scrollbars only for the .bd. I've managed to
      show scrollbars for the whole panel but, doing this, the header
      scrolls away as well, and I just want to scroll the body.


      Here's my code:

      html
      --------------------- 8< --------------------

      function showHelp() {

      YAHOO.bigo.site.helpWindow = new YAHOO.widget.Panel("helpWindow", {
      close:true,
      visible:false,
      draggable:true,
      width:"300px",
      height: "300px",
      iframe: true,
      constraintoviewport:true,
      context: ['foo', 'bl', 'tr']

      });

      YAHOO.bigo.site.helpWindow.setHeader('Help!');
      // asynchronous body
      var params = {
      success: function(o) {
      YAHOO.bigo.site.helpWindow.setBody(o.responseText);
      YAHOO.bigo.site.helpWindow.render(document.body);

      },
      failure: function(o) {
      YAHOO.bigo.site.helpWindow.setBody('Error retrieving help
      information.');
      YAHOO.bigo.site.helpWindow.render(document.body);

      },
      argument: { cmd: 'help'},
      timeout: 1500
      };
      YAHOO.bigo.site.helpWindow.render(document.body);
      YAHOO.bigo.site.helpWindow.show();
      var sUrl = "default/index/help";
      var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, params);

      -------------------- >8 ----------------------

      here's the css I've been trying to use (without success):

      #helpWindow.yui-panel {
      border:none;
      background-color:transparent;
      }

      #helpWindow .bd {
      overflow:auto;
      background-color:#FFF;
      }



      any help will be much appreciated
    Your message has been successfully submitted and would be delivered to recipients shortly.