Hello world !
I have the following script:
<script type=”text/javascript”>
<!–
String.prototype.isEmailAddress = function () {return /^[^x00-x20()<>@,;:].^x00-x20()<>@,;:]@^x00-x20()<>@,;:].^x00-x20()<>@,;:]
function validate (f) {
var e, i = 0;
while (e = f[[‘user_name’, ’email’, ‘confemail’, ‘password’, ‘confpassword’][i++]]) {
if (!/S/.test(e.value)) {alert ([‘Field ‘, e.previousSibling.data, ‘is required.’].join (”)); e.focus(); return false}
}
}
// –>
</script>
I need to validate a check box:
<input name=”level” type=”checkbox” id=”level” value=”2″>
How can I make it as a requirement?
Hope for any help
Sandro27