dojo dijit Tri-State Checkbox Widget Demonstration

This is a demonstration of a dojo dijit tri-state checkbox widget. The buttons allow you to execute the corresponding methods and display properties. Widget works with dojo 1.2+ - 1.6.

The tri-state checkbox is intended to act as a checkbox, allowing the user to indicate on or off. The third state (indeterminate) can be used to allow searches which disregard the state of the checkbox in the search query. You can then search for checkbox on, checkbox off, or checkbox doesn't matter. Indeterminate is considered invalid as an entry, unless it is a search query.

Button titles provide additional description for actions.

Notes

Download a copy: tri.tgz. MD5 48b2f8c8148396d33bbd2a3c1a9d5e22

Updates
26 Jan 2009
Updated to handle promptMessage, invalidMessage, and errorMessage. Initializes value from tag attribute.
30 Mar 2009
Changed to initialize properly off the value attribute of the input tag.
7 Apr 2009
Added required attribute. This can be used for validation to ensure the checkbox is in a valid state if it is required.
4 July 2011
Updated to work with dojo 1.6, sourced from AOL's CDN. Tested with FireFox 3.6.4 (CentOS), IE 7.0 (Windows XP), Chrome 12.0 (Windows XP), Opera 11.10 (Windows XP). Runs as cross-domain/xd.
30 September 2011
Fixed to ensure the checked attribute updates the value on page load.

228 downloads.

Contact - bgamrat through this domain.


Status: None










Server-Side Source (json.tri.php)


header('Content-type: application/json');
/* Echos all inputs back to the requestor */
echo '{';
foreach ($_REQUEST as $k => $v)
echo '"'.$k.'":"'.$v.'",';
/* Echo x:end allows the preceding loop to end all lines with a comma */
echo '"x":"end"}';