Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/06/2012, 14:52
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
Respuesta: en un array se pueden enviar checkbox y input ?

existe alguna menera de ordenarlo mediante js , jquery


Código Javascript:
Ver original
  1. var arrayOpt = new Array;
  2.  
  3.              
  4.          
  5.  
  6.               $('input[type=checkbox]').each(function() {
  7.                         if ($(this).attr('name') == 'opcion[]') {
  8.                             if ($(this).attr('checked') == 'checked') {
  9.                                 arrayOpt.push($(this).val());
  10.                                 } else{
  11.                                 arrayOpt.push($(this).val()==0);
  12.                                
  13.                                 }
  14.                      }
  15.             });
  16.                    
  17.             $("input[name^=txtList]").each(function() {
  18.                         arrayOpt.push($(this).val());
  19.                     });


con el codigo obtengo esto false,false,false,input1,input2,input3

y necesito false ,input1,false, input 2 , false, input 3

el problema es que son muchos datos.