Explorar el Código

check form if already filled

andre hace 4 años
padre
commit
26fd1d9fde
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      checkconfigureproduct.tpl

+ 3 - 2
checkconfigureproduct.tpl

@@ -1,6 +1,7 @@
 <script>
 <script>
     function checkMailAddress ( mailname, maildomain, pid) {
     function checkMailAddress ( mailname, maildomain, pid) {
         var xhttp = new XMLHttpRequest();
         var xhttp = new XMLHttpRequest();
+        var success = false;
         xhttp.onreadystatechange = function() {
         xhttp.onreadystatechange = function() {
             if (this.readyState == 4 && this.status == 200) {
             if (this.readyState == 4 && this.status == 200) {
                 if( this.responseText.trim() == 'yes') {
                 if( this.responseText.trim() == 'yes') {
@@ -14,7 +15,7 @@
                     $("#hintNumeric").text('');
                     $("#hintNumeric").text('');
                     $("#hintSymbols").text('');
                     $("#hintSymbols").text('');
                     $("#hintUpperLower").text('');
                     $("#hintUpperLower").text('');
-                    var success = true;
+                    success = true;
                 } else {
                 } else {
                     console.log(this.responseText);
                     console.log(this.responseText);
                     $(customFields[4]).prop("disabled",true);
                     $(customFields[4]).prop("disabled",true);
@@ -26,7 +27,7 @@
                     $("#hintNumeric").text('');
                     $("#hintNumeric").text('');
                     $("#hintSymbols").text('');
                     $("#hintSymbols").text('');
                     $("#hintUpperLower").text('');
                     $("#hintUpperLower").text('');
-                    var success = false;
+                    success = false;
                 }
                 }
             }
             }
         };
         };