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

the "onAvailable" or "onDOMReady" doesn't work until the user refresh the page.

Expand Messages
  • monkeysday
    Here are the codes below; the problem is the the slide[1] could work when the dom finished, but unless i refresh the page, the slide[0] wouldn t run. who can
    Message 1 of 1 , Mar 3, 2008
    • 0 Attachment
      Here are the codes below;
      the problem is the the slide[1] could work when the dom finished,
      but unless i refresh the page, the slide[0] wouldn't run.

      who can tell me the reason?
      thanks a lot.

      "
      ...
      addOnLoad(function(){
      var _D = YAHOO.util.Dom;
      var _E = YAHOO.util.Event;
      YAHOO.namespace('CN.NCP');
      YAHOO.CN.NCP.slideShow = function(){
      var slide = [];
      slide[0] = new YAHOO.CN.lib.SlideShow("site-up",
      {width:189,height:25,displayPagination :

      false,effect : {motion : "left"}, interval : 2});
      //SlideShow is an object that define before.

      slide[1] = new YAHOO.CN.lib.SlideShow("story",
      {width:338,height:134,effect : {motion :

      "left"}, interval : 4 });
      }
      _E.onAvailable('site-up', YAHOO.CN.NCP.slideShow);
      // _E.onDOMReady(YAHOO.CN.NCP.slideShow);"
    Your message has been successfully submitted and would be delivered to recipients shortly.