This is a collection of scripts that I've created and/or modified. All the scripts are released under a Creative Commons License. Do whatever you want with them - use them as is or modify them to suit your purposes. Both personal and commercial usage is ok by me.
Unless otherwise noted, all scripts degrade gracefully in older browsers that don't support the functionality the script provides (ie. no error messages are triggered) and, with the obvious exception of the Browser Detect script, all use object detection instead of browser detection (which ensures a broad range of browsers will run these scripts including future browsers).
As of 06/11/2001, all scripts have version numbers.
A simple, low-level DHTML API that weighs in at 1065 bytes. You can also download lighter variants and libraries built for the API.
A collection of scripts that perform in-page Adobe Acrobat Reader detection or redirection. Detection of all Acrobat versions up to 5 on IE5+ on the Mac, Netscape 3+, and Opera 3+ and versions 4 to 5 in IE4+ on Windows.
The standard set of functions to read and write cookies.
A countdown timer that tracks the number of days, hours, minutes, seconds, and milliseconds (if you want) until a date and time that you set. Changes in real time. Image or text-based.
A collection of scripts that perform in-page flash detection or redirection. Detection of Flash versions 3 to 7 (with future support for version 8 built-in) in IE4+ on Windows, IE5+ on the Mac, Netscape 3+, Opera 3+, and WebTV2.5+.
A loose grouping of functions that work with forms.
Functions that perform common validations on form values (or any other values). These include credit card, email, and alphanumeric checks.
Load images into a visiting browser's cache to speed the display of future pages.
A collection of scripts that perform in-page quicktime detection or redirection. Detection of both the Quicktime plugin and the ActiveX control (version 4.1.1+) in IE4+ on the Windows, IE5+ on the Mac, Netscape 3+, and Opera 3+.
Image rollovers with minimal (bordering on no) installation. Ease of use does limit the cross-browser-ness of the script (only browsers that support event handlers on
<img> tags are supported so rollovers won't work in NS4.x).
A set of functions that simplify creating windows and popups.
Cross-browser querying of window dimensions and scroll position.
One thing that always bothered me about most DHTML APIs is that they introduce a whole set of non-standard properties and methods in order to deal with the fact that not all browsers implement the standard properties and methods. It would be better to attempt to preserve a standard. For instance, in order to get a reference to an element, the standard defines
document.getElementById(). For systems that don't support this method, one could create a method of the document object with the name
getElementById that mimics the standard behaviour. In this way, when all your target browsers support the standard to perform a task, you aren't still using a non-standard method to perform the same task.
These scripts grew out of this belief. Whenever I came across DOM functionality that was absent from or implemented differently in IE5+, I tried to write a script to build that functionality or map the existing functionality onto the DOM. I've broken them into individual scripts based on the related W3C modules.
Currently just defines the nodeType constants missing from IE5+.
A synthetic event object that follows the DOM2 Event standard and corrects browser quirks in such properties as
clientY. A number of non-standard but helpful properties like
Provides an implementation of NodeFilter and TreeWalker interfaces for IE5+.
Stuff not part of the DOM standard but very helpful. Currently just contains functions that provide consistent values for
offsetLeft properties in IE and Mozilla.