Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/09/2012, 11:35
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Input radio con variable

Hola, quiero poner a la funcion que tengo un input radio con una variable para poder seleccionar la fila pero no me sale.

html_user += '<td >'+<input name="s" type="radio" value=""/>+'</td>';


Código Javascript:
Ver original
  1. function filtrar()
  2. {  
  3.     $.ajax({
  4.         data: $("#frm_filtro").serialize()+ordenar,
  5.         type: "POST",
  6.         dataType: "json",
  7.         url: "ajax.php?action=listar",
  8.             success: function(data){
  9.     var html_user ='' ;
  10.     if(data.length > 0){
  11.         $.each(data, function(i,item){
  12.        
  13.        
  14.          
  15.  html_user += '<tr ondblclick="pulsar(this, ' +  String.fromCharCode(39) + item.num_usuario + String.fromCharCode(39)  + ');" >';
  16.  html_user += '<td >'+<input name="s" type="radio" value=""/>+'</td>';
  17.  html_user += '<td >'+item.num_usuario+'</td>';
  18.  html_user += '<td>'+item.telefono+'</td>';
  19.  html_user += '<td>'+item.nombre+' '+item.apellidos+'</td>';
  20.  html_user += '<td>'+item.poblacion+'</td>';
  21.  html_user += '</tr>';
  22.            
  23.                                  
  24.         });                    
  25.     }
  26.     if(html_user == '') html_user = '<tr><td colspan="4" align="center">No se encontraron registros..</td></tr>';
  27.     $("#data tbody").html(html_user);
  28. }
  29.  
  30.            
  31.       });
  32. }