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

Hide Dialog box on load

Expand Messages
  • juliebonniedaisy
    My dialog box is visible when my page loads and I wish to hide it until I m ready to display it. This module document says to load class yui-pe as early as
    Message 1 of 1 , Sep 25, 2009
    • 0 Attachment
      My dialog box is visible when my page loads and I wish to hide it until I'm ready to display it.

      This module document says to load class "yui-pe" as early as possible: document.documentElement.className = "yui-pe";

      But my yuiloader is at the bottom of the page. how can i hide my dialog onload? also, i put yuiloader at the top to test and the dialog still displays while loading. http://developer.yahoo.com/yui/examples/container/module.html

      <!--Include YUI Loader: -->
      <script type="text/javascript" src="frameworks/yui_2.8.0r4/yui/build/yuiloader/yuiloader-min.js"></script>
      <script type="text/javascript" src="js/loader-config.js"></script>
      <script type="text/javascript">
      (function() {
      var loader = new YAHOO.util.YUILoader(_yuiloader_config.config);

      var modules = _yuiloader_config.modules;
      for (i=0; i < modules.length; ++i) {
      loader.addModule(modules[i]);
      }

      loader.require(["animation","base","button","connection","container","cookie","datasource","datatable","paginator", "dragdrop", "element","json", "logger", "menu","reset-fonts-grids", "yuiloader-dom-event", "maincss", "taskmanagerDataTable"]);

      // Load the files using the insert() method.
      loader.insert({
      onSuccess: function() {

      var _myComponents = ["js/menu-renderer.js"];

      YAHOO.util.Get.script(_myComponents, {
      onSuccess: function() {
      }});

      },
      onFailure:function(msg) {
      YAHOO.log(msg,'error','myPage');
      var t = 0;
      }
      }
      );
      })();
      </script>
      <script type="text/javascript">
      document.documentElement.className = "yui-pe";
      </script>
    Your message has been successfully submitted and would be delivered to recipients shortly.