Ajax Layer JavaScript DHTML





YAHOO.widget.Panel













  YAHOO.namespace("example.panel");
  function init() {
    YAHOO.example.panel.wait = 
        new YAHOO.widget.Panel("wait", 
                { width:"240px", 
                  fixedcenter:true, 
                  underlay:"shadow", 
                  close:false, 
                  draggable:false, 
                  modal:true, 
                  effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.5} 
                  } 
                 );
    YAHOO.example.panel.wait.setHeader("Loading, please wait...");
    YAHOO.example.panel.wait.setBody("");
    YAHOO.example.panel.wait.render(document.body);
    var callback = {
      success : function(o) {
        document.getElementById("content").innerHTML = o.responseText;
        YAHOO.example.panel.wait.hide();
      },
      failure : function(o) {
        document.getElementById("content").innerHTML = "CONNECTION FAILED!";
        YAHOO.example.panel.wait.hide();
      }
    }
    YAHOO.example.panel.wait.show();
    var conn = YAHOO.util.Connect.asyncRequest("GET", "php/somedata.php?r=" + new Date().getTime(), callback);
  }
  YAHOO.util.Event.addListener(window, "load", init);






           
       
yui.zip( 3,714 k)