All pastes #910825 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-20 06:36 UTC
rendered paste body
case "numeric":
           { 
              var charpos = objValue.value.search("[^0-9]");
              if(objValue.value.length > 0 &&  charpos >= 0)
              { 
                if(!strError || strError.length ==0)
                { 
                  strError = objValue.name+": Only digits allowed ";
                }//if               
                alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
                return false; 
              }//if 
              break;
           }//numeric