Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c549f7c2

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID c549f7c2c83e51c3a6747887bcee59d1fb145f13
  • Vorgänger 2788e388
  • Nachfolger 57120914

Tausender-Trennzeichen werden nicht mehr überprüft.

Unterschiede anzeigen:

js/common.js
52 52
  }
53 53

  
54 54
function check_right_number_format(input_name) {
55
  if(thpoint) {
56
    if(thpoint == ','){
57
      var thnumbers = input_name.value.split(',');  
58
      thnumbers[thnumbers.length-1] = thnumbers[thnumbers.length-1].substring((thnumbers[thnumbers.length-1].lastIndexOf(".") !== -1 ? thnumbers[thnumbers.length-1].lastIndexOf(".") : thnumbers[thnumbers.length-1].length), 0);
59
    }
60
    else{
61
      var thnumbers = input_name.value.split('.');  
62
      thnumbers[thnumbers.length-1] = thnumbers[thnumbers.length-1].substring((thnumbers[thnumbers.length-1].lastIndexOf(",") !== -1 ? thnumbers[thnumbers.length-1].lastIndexOf(",") : thnumbers[thnumbers.length-1].length), 0);
63
    }
64
        
65
    for(var i = 0; i < thnumbers.length; i++) {
66
     if(i == 0 && thnumbers[i].length > 3) {
67
      return show_alert_and_focus(input_name, wrongNumberFormat);
68
     }
69
     if(i > 0 && thnumbers[i].length != 3) {
70
       return show_alert_and_focus(input_name, wrongNumberFormat);
71
     }
72
   }
55
//   if(thpoint) {
56
//     if(thpoint == ','){
57
//       var thnumbers = input_name.value.split(',');  
58
//       thnumbers[thnumbers.length-1] = thnumbers[thnumbers.length-1].substring((thnumbers[thnumbers.length-1].lastIndexOf(".") !== -1 ? thnumbers[thnumbers.length-1].lastIndexOf(".") : thnumbers[thnumbers.length-1].length), 0);
59
//     }
60
//     else{
61
//       var thnumbers = input_name.value.split('.');  
62
//       thnumbers[thnumbers.length-1] = thnumbers[thnumbers.length-1].substring((thnumbers[thnumbers.length-1].lastIndexOf(",") !== -1 ? thnumbers[thnumbers.length-1].lastIndexOf(",") : thnumbers[thnumbers.length-1].length), 0);
63
//     }
64
//         
65
//     for(var i = 0; i < thnumbers.length; i++) {
66
//      if(i == 0 && thnumbers[i].length > 3) {
67
//       return show_alert_and_focus(input_name, wrongNumberFormat);
68
//      }
69
//      if(i > 0 && thnumbers[i].length != 3) {
70
//        return show_alert_and_focus(input_name, wrongNumberFormat);
71
//      }
72
//    }
73
//   }
74
  if(decpoint == thpoint) {
75
    return show_alert_and_focus(input_name, wrongNumberFormat);
73 76
  }
74 77
  if(decpoint == ',') {
75 78
    var decnumbers = input_name.value.split(',');

Auch abrufbar als: Unified diff