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.2+, probably backwards compatible to 1.1.+.

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 b62dafa477157476cbeea844a523827f

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.

115 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"}';