Name

Class xbLibrary — implements cross browser Array

Synopsis

class xbLibrary
{ 
  // constructor 
  xbLibrary(String path); 
     
  // methods 
  void     loadScript(String scriptName);
}

xblibrary = new xbLibrary('/lib/js/');
  
		

Source

xbLibrary.js

Description

xbLibrary

xbLibrary is used to manage loading scripts from specificed locations. It also provides error handling for downlevel browsers (do not support document.getElementById) which may not support the level of JavaScript employed in the script libraries.

Note

A default instance of xbLibrary named xblibrary is created when the script is loaded. This default instance should be customized to point to the location where other scripts from xbProjects are located.

You can also override the default instance by creating a new instance and assigning it to the same variable before loading any other scripts from xbProjects which may rely upon the default xbLibrary instance:


<script language="javascript" src="/pathtoxblibrary/xbLibrary.js"></script>
<script language="javascript">
xblibrary = new xbLibrary('newpath');
</script>

    

Methods

xbLibrary(String path)

Constructs an instance of the xbLibrary class for scripts located at the url path.

An instance of xbLibrary named xblibrary with path '/lib/js/' is automatically created when xbLibrary.js is loaded. This should be customized for individual installations to point to where the main xbProjects scripts are located.

Returns. Nothing

Exceptions

  • None

loadScript(String scriptName)

Loads a script scriptName from the location specified by the xbLibrary's path. Primarily used by scripts which need to conditionally load other scripts from the same location.

Returns.  Nothing

Exceptions

  • None