TriStateCheckbox Test 1
function MakeOneTriState()
{
var tsbox = document.getElementById("normal");
tsbox.setAttribute("moz-tristate", "1");
}
function MakeTwoNormal()
{
var tsbox = document.getElementById("tristate");
tsbox.removeAttribute("moz-tristate");
}
function setTwoToMixed()
{
var tsbox = document.getElementById("tristate");
tsbox.setAttribute("moz-tristatevalue", "2");
}
function dumpTwoValue()
{
var tsbox = document.getElementById("tristate");
dump ( "value of button two is " + tsbox.getAttribute("moz-tristatevalue") + "\n" );
}
function dumpOneValue()
{
var tsbox = document.getElementById("normal");
dump ( "value of button one is " + tsbox.getAttribute("moz-tristatevalue") + "\n" );
}
function disableTwo()
{
var tsbox = document.getElementById("tristate");
tsbox.disabled = true;
}
function enableTwo()
{
var tsbox = document.getElementById("tristate");
tsbox.disabled = false;
}
This is a tri-state checkbox test. The first checkbox should only act like a
normal two-state checkbox. The last one should behave like a tri-state.
Button One (Normal)
Button Two (Tristate)
Button Three (Tristate set by css)
Change Mode On Button One
Change Mode On Button Two
Set Two To Mixed
Dump Value of Button One
Dump Value of Button Two
Disable Button Two
Enable Button Two