/****************************************************************************/ // DDX - dynamic data exchange // // Description: // Validation wrappers for forms // // Author: Ralph Lorenc // E-Mail: r.lorenc@it-system.pl // (c) 1999-2004, Internet Technology System Solutions Sp. z o.o. // http://www.it-system.pl (.com) (.de) // // All right reserved. Any portions of this code cannot be // used in any form without licence by IT-SYSTEM company. /****************************************************************************/ function DDXLen(control,minLen,maxLen,errmsg) { var s = control.value; if (s.length < minLen || s.length > maxLen ) { self.status=errmsg; control.focus(); control.select(); alert(errmsg); return false; } return true; } function DDXInt(control,min,max,errmsg) { var s = control.value; if ( isNaN (s,10) ) { self.status=errmsg; control.focus(); control.select(); alert(errmsg); return false; } if ( s.valueOf() < min || s.valueOf() > max ) { self.status=errmsg; control.focus(); control.select(); alert(errmsg); return false; } return true; } function DDXChecked(control,nochecked,errmsg) { if (!control.length) { if (nochecked==1 && control.checked ) return true; else { alert(errmsg); return false; } } var l = control.length; var bRet = false; for ( i=0;i