function controleerNumberRangeMetMelding(obj, minVal, maxVal, naam) { melding1 = "Minimale waarde voor veld " + naam + " is " + minVal melding2 = "Maximale waarde voor veld " + naam + " is " + maxVal if (languageKeyword == 'UK') { melding1 = "Minimum value of " + naam + " is " + minVal melding2 = "Maximum value of " + naam + " is " + maxVal } else if (languageKeyword == 'FR') { melding1 = "Valeur minimale pour champ " + naam + " est " + minVal melding2 = "Valeur maximale pour champ " + naam + " est " + maxVal } if (eval(minVal) > eval(obj.value)) { alert(melding1); obj.focus(); return(false); } if (eval(obj.value) > eval(maxVal)) { alert(melding2); obj.focus(); return(false); } return(true); } function controleerVeldIngevuld(obj, naam) { melding1 = "Veld " + naam + " is verplicht" if (languageKeyword == 'UK') { melding1 = "Field " + naam + " is required" } else if (languageKeyword == 'FR') { melding1 = "Champ " + naam + " est obligatoire" } if (obj.value == "") { alert(melding1); obj.focus(); return (false); } return(true); } function controleerVeldIngevuldNoFocus(obj, naam) { melding1 = "Veld " + naam + " is verplicht" if (languageKeyword == 'UK') { melding1 = "Field " + naam + " is required" } else if (languageKeyword == 'FR') { melding1 = "Champ " + naam + " est obligatoire" } if (obj.value == "") { alert(melding1); return (false); } return(true); } function controleerLengteString(obj, minNumChars, maxNumChars, numChars, naam) { if (!controleerLengteStringByValue(obj.value, minNumChars, maxNumChars, numChars, naam)) { obj.focus(); return(false); } return (true); } function controleerLengteStringByValue(objValue, minNumChars, maxNumChars, numChars, naam) { melding1 = "Het veld " + naam + " moet uit " + numChars + " karakters bestaan"; melding2 = "Het veld " + naam + " bevat te weinig karakters (minimaal: " + minNumChars + ")"; melding3 = "Het veld " + naam + " bevat te veel karakters (maximaal: " + maxNumChars + ")"; if (languageKeyword == 'UK') { melding1 = "This record has to consist of " + numChars + " characters"; melding2 = "This record requires a minimum number of characters of " + minNumChars; melding3 = "This record requires a maximum number of characters of " + maxNumChars; } else if (languageKeyword == 'FR') { melding1 = "Le champ " + naam + " doit consister de " + numChars + " caractères"; melding2 = "Le champ " + naam + " contient trop peu de caractères (minimum: " + minNumChars + ")"; melding3 = "Le champ " + naam + " contient trop de caractères (maximum: " + maxNumChars + ")"; } if (numChars != objValue.length && 0 < numChars) { alert(melding1); return(false); } if (minNumChars > objValue.length && 0 <= minNumChars) { alert(melding2); return(false); } if (maxNumChars < objValue.length && 0 <= maxNumChars) { alert(melding3); return(false); } return (true); } function checkStringContentMetMelding(obj, allowedChars, naam) { melding1 = "In het veld " + naam + " komen karakters voor die niet zijn toegestaan (toegestaan: " + allowedChars + ")" if (languageKeyword == 'UK') { melding1 = "Characters in string that are not allowed (allowed: " + allowedChars + ")" } else if (languageKeyword == 'FR') { melding1 = "Dans le champ " + naam + " apparaissent des caractères qui ne sont pas permis (permis: " + allowedChars + ")" } for (var i = 0; i < obj.value.length; i++) { var c = obj.value.charAt(i) if (allowedChars.indexOf(c) == -1) { alert(melding1); obj.select(); obj.focus(); return (false); } } return (true); } function controleerIntegerSyntaxMetMelding(obj, naam) { melding1 = "In veld " + naam + " mogen alleen getallen worden ingevoerd" if (languageKeyword == 'UK') { melding1 = "Field " + naam + " only allows numbers" } else if (languageKeyword == 'FR') { melding1 = "Dans champ " + naam + " vous pouvez insérer que des chiffres" } for (var i=0;i= "0" && digit <= "9")) { alert(melding1); obj.focus(); return (false); } } return(true); } function controleerFloatSyntaxMetMelding(obj, naam) { melding1 = "In veld " + naam + " mogen alleen decimale getallen worden ingevoerd" if (languageKeyword == 'UK') { melding1 = "Field " + naam + " only allows decimal numbers" } else if (languageKeyword == 'FR') { melding1 = "Dans champ " + naam + " vous pouvez insérer que des chiffres décimaux" } sepFound = 0; for (var i=0;i= "0" && digit <= "9") && ((!(digit == ",")) || (digit == "," && sepFound == 1)) && ((!(digit == ".")) || (digit == "." && sepFound == 1))) { alert(melding1); obj.focus(); return (false); } if (digit == "," || digit == ".") { sepFound = 1; } } return(true); } function controleerInteger(getal) { for (var i=0;i= "0" && digit <= "9")) { return (false); } } return(true); } function controleerFloat(getal) { for (var i=0;i= "0" && digit <= "9") && !(digit == ".") && !(digit == ",")) { return (false); } } return(true); }