Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/03/2014, 10:09
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 8 meses
Puntos: 6
Respuesta: Como enviar select multiple utilizando ajax

Alexis88 gracias por responder , hice lo que me indicaste pero obtengo un error en

el error que obtengo en consola es

Cita:
TypeError: s is undefined
t = s.options.length;
Código Javascript:
Ver original
  1. $('#registrar').click(function(){
  2.  
  3.     var a = [],
  4.         s = document.getElementsByTagName("e9[]")[0],
  5.         t = s.options.length;
  6.    
  7.     for (i = 0; i < t; i++)
  8.         if (s.options[i].selected)
  9.             a.push(s.options[i].value);
  10. var estacion_id = $("#estacion_id").val();
  11.  
  12.  
  13.  
  14. $.ajax({
  15. url:'http:/volcano/public/postInstalador',
  16. type:'post',
  17. data:'e9='+e9+'&estacion_id='+estacion_id
  18. }).done(function(data) {
  19. alert("Evento Guardado");
  20. });
  21. });