I have a form where a user can select items via a check box. Once an item is checked it will enable a button to appear so that the user can add the items to a shopping cart. I have the first part of the JavaScript working which allows the button to appear if the checkbox is true.
The problem that I am having is when I decide to deselect the last remaining box. It does not disable the add button. The first part works, the second part does nothing. Also, there are no JavaScript errors.
-Tsu
The problem that I am having is when I decide to deselect the last remaining box. It does not disable the add button. The first part works, the second part does nothing. Also, there are no JavaScript errors.
-Tsu
Code:
function boxChecked(field)
{
var 1 = 0;
if(field[i].checked = true)
{
var x=document.getElementById("mybutton")
x.disable=false;
}
else
if(field[i].checked = false)
{
var x=document.getElementById("mybutton")
x.disable=true;
Comment