JavaScript Routines is a collection of useful scripts that can facilitate and accelerate the JavaScript development. The download file includes the following scripts:
- addClassName.js
- attachDomEvent.js
- BackgroundImageCache.js
- compatMode.js
- document.getElementById.js
- getElementsByClassName.js
- getElementStyle.js
- pageLoad.js
- pageUnload.js
- relExternal.js
- removeClassName.js
- splitStringToArray.js
- toggleElement.js
Download JavaScript Routines
These scripts are included in the latest version of Acid.JS – The AJAX Tools and Widgets Library as well.
Archive for October, 2008
JavaScript Routines – The Most Used Functions at Hand
Posted in JavaScript, Web Development, tagged everyday javascript, javascript collection, javascript library, javascript routine, most used javascript functions, must have javascript functions, popular javascript functions, useful javascript on October 29, 2008 | Leave a Comment »
Using ECML 1.1 to Make Website Forms Compatible with Google Toolbar AutoFill and WAND
Posted in Forms, Tips and Tricks, Web Development, tagged Forms, ECML, auto fill, wand, Electronic Commerce Modeling Language, Field Specifications for E-Commerce, wallet software, autofill, ECML 1.1 on October 28, 2008 | Leave a Comment »
Recently, I was asked how it is possible to make website forms compatible with Google Toolbar Auto Fill, Wand and other auto fill or wallet software. The answer is quite obvious – the form fields “name” attributes should comply to certain rules and naming conventions, but the problem is that it is hard to find [...]
Using compatMode to Determine the Standards Compliance Mode of the Page on the Client
Posted in Browsers, JavaScript, Tips and Tricks, Web Development, doctype, tagged compatMode, quirks mode, standards-compliance mode, determine if a page is in a standards-compliance or in, strict mode, compatMode IE, compatMode FF, compatMode Opera, get the doctype of a webpage, determine the doctype of the page, doctype, dtd, document type definition, document type declaration, get dtd on October 21, 2008 | Leave a Comment »
Have you ever used the compatMode property JavaScript to determine if a web-page is in standards-compliant or in quirks mode directly on the client?
compatMode was first introduced in Internet Explorer 5.5, and later adopted by FireFox and Opera, and is rather convenient for third party component developers. One of its possible uses is if you develop [...]
Unobtrusive CSS Loading Indicator for Images
Posted in CSS, Tips and Tricks, Web Development, XHTML, tagged image loader, image loading, img loader, img loading, loading, loading indicator, loading progress on October 7, 2008 | 3 Comments »
A few developers are actually aware that the image tag supports background images (as well as practically any other CSS property). Here is a quick and unobtrusive technique for creating loading indicator for images without using JavaScript, that relies on the above feature.
1. Create a loading indicator. You may use http://ajaxload.info.
2. Create the markup for [...]
CSS: Filtering and Distinguishing Google Chrome and Safari
Posted in Browsers, CSS, CSS Hacks, Tips and Tricks, tagged css filters, css hack, google chrome css hack, safari css hack on October 1, 2008 | 4 Comments »
As body:nth-of-type(1) and body:first-of-type are supported by FireFox 3.5x, the hack that I wrote about in this post cannot be used anymore. You may try the following one, which targets only Google Chrome and Safari.
Personally, I avoid using CSS hacks, and when writing client code I always assume that anything can be done the “legal” way.
However, [...]