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 information about that specification.
For those who are interested in making their website forms compatible with third party auto fill and wallet software, here is a link to ECML 1.1 (Electronic Commerce Modeling Language) – Field Specifications for E-Commerce. Optionally, you can download the specification from this link.
A few days after the release of the first version of ContextMenu.XML, here’s the new one – with added support for radiobutton lists and improved performance and rendering.
ContextMenu.XML comes with a set of 11 predefined skins – Acid, AcidMachine, Blue, Default, Green, Mac, Office2003, Office2007, Orange, Red and WeMakeSites, but users can easily create their own skins by modifying an existing skin or creating one from a scratch.
ContextMenu.XML allows users to disable items, to add custom functions or URLs, set item icon, checkboxes, radiobutton lists, define width of menu and even to disable the rendering of the entire context menu, as well as a couple of other handy features.
ContextMenu.XML works with Internet Explorer 6/7/8 and Mozilla FireFox 2/3, as only these two browsers allow scripting of the context menu. Safari, Opera and Google Chrome gracefully degrade and display browser’s context menu.
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 and provide scripts , widgets or layouts that require xhtml mode and are not intended to work in quirks mode – you may display a compatibility warning if your clients try to use your component in quirks mode or in HTML 4.01 or earlier version.
compatMode can return two possible values – BackCompat, if the standards compliance mode is not switched on (the page is missing a !DOCTYPE declaration, the !DOCTYPE is HTML 4.01 or earlier version, or !DOCTYPE is XHTML, but is preceeded by a XML prolog that triggers quirks mode in IE6 (<?xml version="1.0" encoding="utf-8" ?>)), or CSS1Compat– if the standards compliance mode is switched on.
Here is an example function illustrating the compatMode property:
var cMode = document.compatMode;
if(cMode == 'CSS1Compat')
alert('This page is in a standards compliant mode.');
if(cMode == 'BackCompat')
alert('This page is in a non-standards compliant (quirks) mode.');
To test the loading effect locally, remove the src attribute of the image tags, or simply set an unexisting url. The same effect will appear in online galleries that use large images – the loading image will load faster (as it is some 1-2Kb in size) and will be displayed until the actual image is fully loaded.