Library xbDOM — Cross Browser DOM API with support for Gecko based browsers, Internet Explorer 4+, Opera 5+, Netscape Navigator 4.x.
HTMLElement xbGetElementById(String sId, Window windowRef); Array xbGetElementsByName(String sName, Window WindowRef); Array xbGetElementsByNameAndType(String sName, String sType, Window WindowRef); Number xbGetPageScrollX(Window windowRef); Number xbGetPageScrollY(Window windowRef); Number xbGetWindowHeight(Window windowRef); Number xbGetWindowWidth(Window windowRef); xbSetInnerHTML(HTMLElement element, String sHtml); Number xbToInt(String sValue);
xbDOM.js is a JavaScript Library that is used to provide cross browser functionality for basic operations in a cross browser fashion. Netscape Navigator 4.x, Gecko based browsers such as Netscape 6.x, Internet Explorer 4+ and Opera 5+ are supported.
Browser Sniffing. DOM based browser sniffing is used whereever possible to allow any standards compliant browser to support xbDOM.js. Please note that due to a bug in Netscape Navigator 4, it is sometimes necessary to include an empty script block before any scripts are referenced via the src attribute. This will make sure that Netscape Navigator 4 properly initializes the document.layers object which is used in detecting Netscape Navigator 4 via object sniffing.
Example 1. Basic Example
returns a reference to the HTMLElement in the specified window with the specified ID.
Arguments:
Returns: HTMLElement if one exists with the specified ID, null otherwise.
Arguments:
Returns: Array of HTMLElements with name attribute matching
Arguments:
Supported Values
Returns: Array of HTMLElements of the specified type with name attribute matching
Arguments:
Returns: Number horizontal scroll position of current window in pixels
Arguments:
Returns: Number vertical scroll position of current window in pixels
Arguments: Window reference to the Window to be measured. If not specified, defaults to current window.
Returns: Number height of referenced window in pixels"
Arguments: Window reference to the Window to be measured. If not specified, defaults to current window.
Returns: Number width of referenced window in pixels"
Arguments:
Returns: Nothing
Support. Gecko, Netscape Navigator 4+, Internet Explorer 4+
Arguments: String to be converted to a number.
Returns: Number in base 10. If the String is not a valid number, 0 is returned.
Support. Gecko, Netscape Navigator 4+, Internet Explorer 4+, Opera