Advertisement
_cronos2

Undefined indexes

Aug 6th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var xhr = JSPlus.ajax(), str = '';
  2. xhr.open('POST', 'process.php', true);
  3. for(var i = 0; act = P('form').elements[i]; i++){ act.type != 'submit' && (str += '&' + act.id + '=' + act.value); }
  4. xhr.send(str = str.substr(1));
  5. xhr.onreadystatechange = function(){
  6.  xhr.readyState == 4 && xhr.status == 200 && xhr.responseText.charAt(0) == '1' && P('#modal').css('display', 'block');
  7.  // La petición esta lista y el resposeText es "1" : Mostramos la ventana OK
  8. }
  9.  
  10. /*
  11.  
  12. 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).
  13. ¿Qué está pasando?
  14.  
  15. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement