added selector access sanity check
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Aug 2006 18:42:13 +0000 (18:42 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Aug 2006 18:42:13 +0000 (18:42 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5662 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/utils.js

index 7f1976f..6f8fb3b 100644 (file)
@@ -199,6 +199,7 @@ function setSelectorRegex( sel, regex ) {
 
 function getSelectorVal( sel ) {
        if(!sel) return null;
+       if( sel.selectedIndex < 0 ) return null;
        var o = sel.options[sel.selectedIndex];
        var v = o.value; 
        if(v == null) v = o.innerHTML;