How to enable or disable submit button depending on ratio value?
I have a ratio button which let user to agree or disagree with TOS agreement. I want to make sure that user can submit the form only after agree to the agreement.

How would I do this?

I have tried this but it doesn't work.

    <script type="text/javascript">
        function chradioEnableSubmit() 
        {
            if (document.getElementById("TOS1").checked == true)
            {
                document.getElementById("Submit").disabled = false;
            }
            else
            {
                document.getElementById("Submit").disabled = true;
            }
        }
    </script>

And this is a part of my form:

    <table width="100%">
    	<tr>
    		<td width="30%">Do you accept <a href="terms_of_service.html" target="_blank">Terms of Service</a> agreement?</td>
    		<td width="10px" style="min-width: 10px"></td>
    		<td width="70%">
    			<input type="radio" name="TOS1" value="Agree">I Agree<br>
    			<input type="radio" name="TOS2" value="Disagree" checked>I Dissagree
    		</td>
    	</tr>
    	<tr height="10px"></tr>
    	<tr>
    		<td width="30%"></td>
    		<td width="10px" style="min-width: 10px"></td>
    		<td width="70%">
    			<input type="submit" name="Submit" value="Submit" disabled> 
    			<input type="reset" name="Reset" value="Reset">
    		</td>
    	</tr>
    </table>

How to do this?
How to enable or disable submit button depending on ratio value?
===

I have a ratio button which let user to agree or disagree with TOS agreement. I want to make sure that user can submit the form only after agree to the agreement.

How would I do this?

I have tried this but it doesn't work.

    <script type="text/javascript">
        function chradioEnableSubmit() 
        {
            if (document.getElementById("TOS1").checked == true)
            {
                document.getElementById("Submit").disabled = false;
            }
            else
            {
                document.getElementById("Submit").disabled = true;
            }
        }
    </script>

And this is a part of my form:

    <table width="100%">
    	<tr>
    		<td width="30%">Do you accept <a href="terms_of_service.html" target="_blank">Terms of Service</a> agreement?</td>
    		<td width="10px" style="min-width: 10px"></td>
    		<td width="70%">
    			<input type="radio" name="TOS1" value="Agree">I Agree<br>
    			<input type="radio" name="TOS2" value="Disagree" checked>I Dissagree
    		</td>
    	</tr>
    	<tr height="10px"></tr>
    	<tr>
    		<td width="30%"></td>
    		<td width="10px" style="min-width: 10px"></td>
    		<td width="70%">
    			<input type="submit" name="Submit" value="Submit" disabled> 
    			<input type="reset" name="Reset" value="Reset">
    		</td>
    	</tr>
    </table>

How to do this?