For a list of demos/examples (Contribute your own!) , please visit the
Demo List page
Welcome to JSLoader
About JSLoader
JSLoader is all about organizing AJAX libraries in a consistent and predictable manner, and as a byproduct of being organized, you can programmatically load the libraries.
How it works
Using JSLoader on this TWiki Site
Using JSLoader should be easy. The script is already installed on every page, so all you need to do is create a <script> tag with <noautolink> inside of it (to prevent the wiki from interfering) and you should be able to load any of the available modules.
Once you've loaded them, close the script tag out, and use a separate script block for using the API.
Please keep this TWiki clean and appropriate. Use it to prototype/design demo pages that use the various libraries. Start off in the
Sandbox.WebHome and then you can move your examples into the JSLoader TWiki page.
Using JSLoader outside of this site.
My server isn't designed to be a robust AJAX hosting company, but try it out. Take a webpage on your website somewhere, and include the SCRIPT as listed on the
Homepage and then call JSLoader.load() to bring functionality on your page. - It should work without any issues. (Except for Rich Text Editors, which much be sitting locally, and cannot be loaded remotely due to Same-Origin Policy - The goal in that case is to use this methodology to create a local shared file system and symlink/mount it into all of your webservers' root directory)
What modules can I load in JSLoader?
// Dojo Toolkit
JSLoader.load("ria","dojo","0.4.3");
JSLoader.load("ria","dojo","0.9.0");
JSLoader.getLoader("ria","dojo","0.9.0").load("dojo"); // equiv to above
JSLoader.getLoader("ria","dojo","0.9.0").load("dijit");
JSLoader.load("ria","dojo","1.0.0beta");
JSLoader.getLoader("ria","dojo","1.0.0beta").load("dojo"); // equiv to above
JSLoader.getLoader("ria","dojo","1.0.0beta").load("dijit");
// Ext.js
JSLoader.load("ria","ext","1.1.1");
JSLoader.load("ria","ext","2.0-beta1");
// FCKEditor (this will only work on a LOCAL version (you can't source this file remotely)
JSLoader.load("ria","fckeditor","2.5");
// JQuery (no plugins yet...)
JSLoader.load("ria","jquery","1.2.1");
// Lightbox (for prototype/scriptaculous)
JSLoader.load("ria","lightbox","2.03");
// MochiKit
JSLoader.load("ria","mochikit","1.3.1");
// PlotKit
JSLoader.load("ria","plotkit","0.9.1");
// or load individually
JSLoader.getLoader("ria","plotkit","0.9.1").loadAll(
["Base", "Canvas","EasyPlot","excanvas", "Layout","PlotKit", "SVG", "SweetCanvas", "SweetSVG"]
);
//Google Prettify
JSLoader.load("ria","prettify","1.0");
// Prototype.js
JSLoader.load("ria","prototype","1.5.1");
JSLoader.load("ria","prototype","1.6.0-rc0");
// Scriptaculous
JSLoader.load("ria","scriptaculous","1.7.1-beta3");
JSLoader.load("ria","scriptaculous","1.8.0-pre1");
// SWFUpload
JSLoader.load("ria","swfupload","7.0-beta3");
JSLoader.load("ria","swfupload","7.0-beta3-impl"); // with default handlers
// TinyMCE
JSLoader.load("ria","tinymce","2.1.2");
// YahooUI (YUILoader Only, then use the YUILoader)
JSLoader.load("ria","yui","2.3.1");
How Does it Work?
For more on how it works, pleas visit the
How it works topic.