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

Re: Load Module Resources with YUILoader

Expand Messages
  • Caridy PatiƱo Mayea
    Hello Charles: The YUILoader utility support two type of components (js or css), so you can create the corresponding dependencies and use the method
    Message 1 of 2 , Nov 30, 2007
    • 0 Attachment
      Hello Charles:

      The YUILoader utility support two type of components (js or css), so
      you can create the corresponding dependencies and use the method
      "addModule" to load them. The images and sounds must be loaded using
      another technique.

      loader.addModule({
      name: "mymodule1css",
      type: "css",
      fullpath: 'http://www.bubbling-library.com/path/to/mymodule1.css'
      });
      loader.addModule({
      name: "mymodule1",
      type: "js",
      fullpath: "http://www.bubbling-library.com/path/to/mymodule1-min.js",
      requires: ['mymodule1css']
      });
      loader.insert();

      Best Regards,
      Caridy (caridy at gmail.com)
      http://www.bubbling-library.com/

      --- In ydn-javascript@yahoogroups.com, "chaluwa" <chaluwa@...> wrote:
      >
      > Hello folks, I have this custom module representing a custom widget that
      > I intend to include in my applications with the YUILoader utility,
      > however it requires other resources like css files and images to render
      > as intended in the design. Now the problem is how do I build
      > dependencies for the resources (e.g css, images, sound etc) of the
      > script
      >
      > Do I have to use the addModule() method on each of these resources
      > individually?
      > Need suggestions.
      >
      > Thanks
      > Charles Odili
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.