Hi guys,
I have the following code which enables a button when the checkbox is checked.
The following is a snippet from the code I have in my HTML page. It's much the same however for some reason it's not working. I think I may have been looking at it for too long.
<script type='text/javascript'>
$(function() {
$('#agree').click(function() {
var satisfied = $('#agree:checked').val();
if (satisfied != undefined) $('#submit').removeAttr('disabled');
else $('#submit').attr('disabled', 'disabled');
});
});
</script>
<form>
<table>
<td colspan="5"><input type="checkbox" id="agree" name="agree" />I have read and agree to the terms and
conditions</td>
</tr>
<tr>
<td colspan="5" align="center"><input name="Submit" type="submit" id="submit" disabled value="I Accept.
Submit"/>
<label>
<input name="reset" type="reset" id="reset" value="Reset" />
<input type="hidden" name="ip" value=" echo $REMOTE_ADDR; " />
</label></td>
</tr>
<tr>
<td>*Required Fields</td>
<td colspan="4"></td>
</tr>
<tr>
<td colspan="5"><h3></h3>
<p> </p></td>
</tr>
</table>
</fieldset>
</form>