How can I disable the submit button?
<p>Here is the code How can I disable the submit button. It doesn't appear to be working for us.I want to be able to have the button disabled when the page is brought up.  Do you have any ideas on how we can fix this?</p>

<pre><code>// Script 10.5 - pizza.js
// This script creates a master checkbox.

// Function called when the checkbox's value changes.
// Function toggles all the other checkboxes.
function toggleCheckboxes() {
'use strict';

// Get the master checkbox's value:
var status = document.getElementById('toggle').checked;

// Get all the checkboxes:
var boxes = document.querySelectorAll('input[type="checkbox"]');

// Loop through the checkboxes, starting with the second:
for (var i = 1, count = boxes.length; i &lt; count; i++) {

    // Update the checked property:
    boxes[i].checked = status;

} // End of FOR loop.
}
} // End of toggleCheckboxes() function.

function disabled () {
    if ('')
    {document.getElementById('submit').disabled = false;}
    else
    {document.getElementById('submit').disabled = true;}


// Establish functionality on window load:
window.onload = function() {
'use strict';

// Add an event handler to the master checkbox:
document.getElementById('toggle').onchange = toggleCheckboxes;

document.getElementById('submit').disabled = disabled;

};
</code></pre>

<p>Here is the html</p>

<pre><code>&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Operating Systems&lt;/title&gt;
&lt;!--[if lt IE 9]&gt;
&lt;script &lt;/script&gt;
&lt;![endif]--&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!-- Script 10.4 - pizza.html --&gt;
&lt;form action="#" method="post" id="theForm"&gt;
&lt;fieldset&gt;&lt;legend&gt;Create Your Own Pizza&lt;/legend&gt;
&lt;div&gt;&lt;label&gt;Toppings&lt;/label&gt; &lt;input type="checkbox" name="toggle" id="toggle"        value="toggle"&gt; All/None
&lt;p&gt;&lt;input type="checkbox" name="ham" id="ham" value="ham"&gt; Ham
&lt;input type="checkbox" name="mushrooms" id="mushrooms" value="mushrooms"&gt; Mushrooms
&lt;input type="checkbox" name="onions" id="onions" value="onions"&gt; Onions
&lt;input type="checkbox" name="sausage" id="sausage" value="sausage"&gt; Sausage
&lt;input type="checkbox" name="greenPeppers" id="greenPeppers" value="greenPeppers"&gt;  Green Peppers &lt;/p&gt;
&lt;/div&gt;
&lt;input type="checkbox" name="terms" id="terms" required&gt; I agree to the terms, whatever they are.
&lt;input type="submit" name="submit" value="Submit" id="submit"&gt;
&lt;/fieldset&gt;
&lt;div id="output"&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;script src="js/utilities.js"&gt;&lt;/script&gt;
&lt;script src="js/pizza.js"&gt;&lt;/script&gt;
&lt;script src="js/modal.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
