Skip to content

Instantly share code, notes, and snippets.

@vinbarnes
Created March 6, 2009 17:29
Show Gist options
  • Select an option

  • Save vinbarnes/74985 to your computer and use it in GitHub Desktop.

Select an option

Save vinbarnes/74985 to your computer and use it in GitHub Desktop.
<html>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script type="text/javascript" charset="utf-8">
var $j = jQuery.noConflict();
var verify_hci_agreement_checked = function(form) {
if ($j('#checkme').attr('checked') == false) {
msg = "You must agree to the terms."
alert(msg)
$j('div#notice').text(msg).show();
return false;
} else {
return true;
}
};
$j(function() {
$j("form#hcistuffz").submit(function() { return verify_hci_agreement_checked(this); });
});
</script>
<body>
<div id="notice" style="display: none;"> </div>
<form id="hcistuffz">
<input id="checkme" name="checkme" type="checkbox" />
<input type="submit" />
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment