Hopefully you'd do this unobtrusively. Inline JS events are gross. Also, you can add a required attribute (required="required" or just required is fine). Any HTML5 supporting browser won't allow the form to submit without the checkbox being checked then.
Kind regards, Keri Henare --------------------------------------------------- Chief Technical Officer Pixel Fusion [e] [email protected] [w] pixelfusion.co.nz [m] (+64) 021 874 552 [p] (+64) 09 550 3084 Zend Certified Engineer - http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND013450 PLEASE NOTE: I check my email 3 times per day and will respond at these intervals. For anything urgent please ring me. --------------------------------------------------- On 22/11/2010, at 7:10 PM, Stephen wrote: > On 22/11/2010 4:28 PM, Shay wrote: >> Hi guys, does anybody know the easiest way to validate a checkbox for >> say in a Terms and Agreements box before the user is allowed to >> proceed? >> > <form onsubmit="functiontoCheckCheckbox()"> along with PHP (or whatever other > language you're doing) validating it was checked on the next page. > I'm not sure I understand this question... You validate it by checking if > it's ticked right? > > -- > NZ PHP Users Group: http://groups.google.com/group/nzphpug > To post, send email to [email protected] > To unsubscribe, send email to > [email protected] -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
