Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xhr = JSPlus.ajax(), str = '';
- xhr.open('POST', 'process.php', true);
- for(var i = 0; act = P('form').elements[i]; i++){ act.type != 'submit' && (str += '&' + act.id + '=' + act.value); }
- xhr.send(str = str.substr(1));
- xhr.onreadystatechange = function(){
- xhr.readyState == 4 && xhr.status == 200 && xhr.responseText.charAt(0) == '1' && P('#modal').css('display', 'block');
- // La petición esta lista y el resposeText es "1" : Mostramos la ventana OK
- }
- /*
- El responseText es el típico código HTML de error PHP, y dice que "Undefined index" para todos los campos que envío (nombre, email, web y mensaje).
- ¿Qué está pasando?
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement