1/* 2Formular-Feldfunctions 32004-08-24 4Dieter Siebeck 5Copyright (c) 2004 Zaunz Publishing. All Rights Reserved. 6*/ 7 8function formLib_getOptionHashFromArray(option_array){ 9 var option_hash = {}; 10 var i; 11 for(i=0;i<option_array.length;i++){ 12 option_hash[option_array[i]] =option_array[i]; 13 } 14 return option_hash; 15} 16 17function formLib_setOptions(select, optArr,selVal){ 18 19 select.options.length = (select.type!='select-multiple' && select.options[0] && select.options[0].value=='')?1:0; 20 var id, op; 21 //alert(typeof(selVal)); 22 var selectedValues = selVal; 23 if(typeof(selVal) != "object"){ 24 selectedValues = new Object(); 25 selectedValues[selVal]=true; 26 } 27 28 var s=0; 29 for(id in optArr)s++; 30 if(s==0){ 31 optArr = {0:'keine Datens�tze verf�gbar'}; 32 } 33 34 for(id in optArr){ 35 op = new Option(optArr[id],id); 36 op.selected = (selectedValues[id])?true:false; 37 select.options[select.length] = op; 38 }; 39 fireEvent(select,"onchange"); 40 41} 42 43function fireEvent(sourceObj,evtType){ 44 45 if(sourceObj.fireEvent){ 46 sourceObj.fireEvent(evtType); 47 }else{ 48 var evt = document.createEvent('HTMLEvents'); 49 evt.initEvent(evtType,true,true); 50 sourceObj.dispatchEvent(evt); 51 } 52} 53 54function onlyNumbers(evt){ 55 var charCode = getInputCharCode(evt); 56 if(charCode == 45) return true; //strich 57 if(charCode > 13 &&(charCode < 48 || charCode > 57)){ 58 //alert(charCode); 59 return false; 60 } 61} 62function onlyFloat(evt){ 63 var charCode = getInputCharCode(evt); 64 if(charCode == 44 || charCode == 45 || charCode == 46)return true;//punkt, strich +komma 65 if(charCode > 13 &&(charCode < 48 || charCode > 57)){ 66 return false; 67 } 68} 69 70function getInputCharCode(evt){ 71 evt = (evt)? evt: event; 72 if(evt){ 73 var charCode = (evt.charCode || evt.charCode == 0) ? evt.charCode : 74 ((evt.keyCode) ? evt.keyCode : evt.which); 75 //alert(charCode) 76 return charCode; 77 } 78 return ""; 79} 80
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.