function ValidateForm26(){ var flag = true; var message = 'Gelieve alle verplichten velden in te vullen'; if(http.readyState == 4) { var showcheck = http.responseText; if (showcheck=='0') { message = 'Onjuste verificatie code'; flag = false; }; if (document.ContactForm26.field263.value.length==0){ flag = false; }; if (document.ContactForm26.field264.value.length==0){ flag = false; }; if (document.ContactForm26.field265.value.length==0){ flag = false; }; if (document.ContactForm26.field266.value.length==0){ flag = false; }; if (document.ContactForm26.field267.value.length==0){ flag = false; }; if (flag == false) { alert(message); } else { document.ContactForm26.submit(); }; }; };function createRequestObject(){ try { xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert('Sorry, je brouser ondersteunt geen XML Http Request.'); }; return xmlhttp; }; var http = createRequestObject(); function CheckForm26() { var captchacheck = document.ContactForm26.captchacode.value; var url = '/form/captcha-uitvoer.php?captcha=' + captchacheck; http.open('GET', url, true); http.onreadystatechange = ValidateForm26; http.send(null); };