I believe
if you change 'window.document.searchreq.barcode.focus();' to 'barcode.focus();',
it should work. Your passing barcode to your function as a reference, so
there for barcode is already = to 'document.searchreq.barcode'.
Marlon Moyer
Karen Harker wrote:
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
Marlon Moyer
Karen Harker wrote:
[EMAIL PROTECTED]">Yes! Thank you. That solved problem 1 (the most nagging one).Would you by chance happen to know how to fix problem 2?2) When activating the onChange event handler, it brings up the error message, but does not return the focus to the field, but rather to the next field.Thank you, again.Karen
>>> [EMAIL PROTECTED] 10/16/01 5:51:35 PM >>>
Karen try the following:
<!---This checks the barcode number against the possible ranges--->
function barcodeRange(barcode) {
if (!((barcode.value >= '21386000000000' && barcode.value <=
'21386000999999')
|| (barcode.value >= '22222000000000' && barcode.value <=
'22222009999999'))) {
alert("Enter your full UT Southwestern Library card number with no spaces")
window.document.searchreq.barcode.focus();
return(false); <----------- add this line here.
}
}
Marlon
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
