If checkbox unchecked disable upload button
<p>I am using valums file uploader. But I want to initiate a checkbox, to disable the upload button if user hasnt checked it.</p>

<p>I can get it working in a regular form, but not using valums because I think, he uses div elements as form attributes.. so I am guessing I have screwed my code up.</p>

<p>In html I have:</p>

<pre><code>&lt;form class="well"&gt;
&lt;label&gt;Upload a Single File&lt;/label&gt;
&lt;label class="checkbox"&gt;
&lt;input id="tos" onclick="if(this.checked){this.form.qq-upload-button.disabled=false}else{this.form.qq-upload-button.disabled=true};this.blur();" checked="" value="1" name="tos" type="checkbox"&gt; I have read and agree to the &lt;a href="/tos"&gt;TOS&lt;/a&gt;
&lt;/label&gt;
&lt;div id="file-uploader-demo1"&gt;      
    &lt;noscript&gt;          
        &lt;p&gt;Please enable JavaScript to use file uploader.&lt;/p&gt;
        &lt;!-- or put a simple form for upload here --&gt;
    &lt;/noscript&gt;         
&lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>In fileuploader.js ( valums code I have )</p>

<pre><code>template:   '&lt;div class="qq-uploader"&gt;' + 
            '&lt;div class="qq-upload-drop-area"&gt;&lt;span&gt;Drop files here to upload&lt;/span&gt;&lt;/div&gt;' +
            '&lt;div class="qq-upload-button btn btn-primary left"&gt;Upload a file&lt;/div&gt;&lt;span class="help-inline"&gt;&amp;nbsp;Lets Do it!&lt;/span&gt;' +
            '&lt;ul class="qq-upload-list"&gt;&lt;/ul&gt;' + 
            '&lt;/div&gt;',
</code></pre>

<p>Can you spot what I have cocked up ?</p>

<p>Essentially, I wish to disable upload button if user has not checked the checkbox.</p>

<p>For a regular form, this code works:</p>

<pre><code>&lt;form class="well"&gt;
  &lt;label&gt;Upload a Single File&lt;/label&gt;
  &lt;input type="file" class="span3" placeholder="Click Here"&gt;
  &lt;span class="help-inline"&gt;Associated help text!&lt;/span&gt;
  &lt;label class="checkbox"&gt;
  &lt;input id="tos" onclick="if(this.checked){this.form.btn.disabled=false}else{this.form.btn.disabled=true};this.blur();" checked="" value="1" name="tos" type="checkbox"&gt; I have read and agree to the &lt;a href="/tos"&gt;TOS&lt;/a&gt;
  &lt;/label&gt;
  &lt;input name="btn" type="submit" class="btn btn-primary left" value="UPLOAD"&gt;
&lt;/form&gt;
</code></pre>
