return false; } else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX") { if (obj.checked) return true; else return false; } else if (obj_type == "RADIO" || obj_type == "CHECKBOX") { for (i=0; i < obj.length; i++) { if (obj[i].checked) return true; } return false; } } function _CF_checkinteger(object_value) { //Returns true if value is a number or is NULL //otherwise returns false if (object_value.length == 0) return true; //Returns true if value is an integer defined as // having an optional leading + or -. // otherwise containing only the characters 0-9. var decimal_format = "."; var check_char; //The first character can be + - blank or a digit. check_char = object_value.indexOf(decimal_format) //Was it a decimal? if (check_char < 1) return _CF_checknumber(object_value); else return false; } function _CF_numberrange(object_value, min_value, max_value) { // check minimum if (min_value != null) { if (object_value < min_value) return false; } // check maximum if (max_value != null) { if (object_value > max_value) return false; } //All tests passed, so... return true; } function _CF_checknumber(object_value) { //Returns true if value is a number or is NULL //otherwise returns false if (object_value.length == 0) return true; //Returns true if value is a number defined as // having an optional leading + or -. // having at most 1 decimal point. // otherwise containing only the characters 0-9. var start_format = " .+-0123456789"; var number_format = " .0123456789"; var check_char; var decimal = false; var trailing_blank = false; var digits = false; //The first character can be + - . blank or a digit. check_char = start_format.indexOf(object_value.charAt(0)) //Was it a decimal? if (check_char == 1) decimal = true; else if (check_char < 1) return false; //Remaining characters can be only . or a digit, but only one decimal. for (var i = 1; i < object_value.length; i++) { check_char = number_format.indexOf(object_value.charAt(i)) if (check_char < 0) return false; else if (check_char == 1) { if (decimal) // Second decimal. return false; else decimal = true; } else if (check_char == 0) { if (decimal || digits) trailing_blank = true; // ignore leading blanks } else if (trailing_blank) return false; else digits = true; } //All tests passed, so... return true } function _CF_checkrange(object_value, min_value, max_value) { //if value is in range then return true else return false if (object_value.length == 0) return true; if (!_CF_checknumber(object_value)) { return false; } else { return (_CF_numberrange((eval(object_value)), min_value, max_value)); } //All tests passed, so... return true; } function _CF_checkCFForm_1(_CF_this) { if (!_CF_hasValue(_CF_this.firstName, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.firstName, _CF_this.firstName.value, "You must provide your first name.")) { return false; } } if (!_CF_hasValue(_CF_this.lastName, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.lastName, _CF_this.lastName.value, "You must provide your last name.")) { return false; } } if (!_CF_hasValue(_CF_this.coastline, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.coastline, _CF_this.coastline.value, "You must provide the appropriate COASTLINE Library Card Number.")) { return false; } } if (!_CF_checkrange(_CF_this.coastline.value, 2288100000000, 22881999999999)) { if (!_CF_onError(_CF_this, _CF_this.coastline, _CF_this.coastline.value, "You must provide the appropriate COASTLINE Library Card Number.")) { return false; } } if (!_CF_checkinteger(_CF_this.coastline.value)) { if (!_CF_onError(_CF_this, _CF_this.coastline, _CF_this.coastline.value, "You must provide the appropriate COASTLINE Library Card Number.")) { return false; } } if (!_CF_hasValue(_CF_this.phone, "TEXT" )) { if (!_CF_onError(_CF_this, _CF_this.phone, _CF_this.phone.value, "You must provide contact information.")) { return false; } } return true; } //-->
|
|
Reference Request Form
Send your reference questions by filling out this form. We will respond to your question as soon as possible, generally in one business day. You can also make an appointment by contacting a SOCC librarian. Required entries are marked with *.
|
| Home | Search | Privacy
Policy | Contact Last revised: Tuesday, March 18, 2008 © 1998 - 2008 Southwestern Oregon Community College 1988 Newmark Ave., Coos Bay, OR 97420 • (541) 888.2525 • 1.800.962.2838 • All rights reserved. Southwestern Oregon Community College is an equal opportunity educator and employer. |