![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
04/12/2008, 12:06
|
| | Fecha de Ingreso: abril-2008
Mensajes: 8
Antigüedad: 16 años, 9 meses Puntos: 0 | |
Respuesta: Problema con array Gracias por leer mi problema pero ya quedo solucionado
<script>
$(document).ready(function(){
$("#acep").bind("click", function(e){
var List_chk = $(".conf"); //lista de checbox
var comp = new Array(); var c = 0 ;
for ( var nIndice = 0; nIndice < List_chk.length; nIndice++ ){
if( List_chk[nIndice].checked){ comp[nIndice] = List_chk[nIndice].value ;// problema con esta linea comp[c++] = List_chk[nIndice].value ;// asi debe de ir
}
}
if ( comp.length == 0 ){
alert(" No has seleccionado ninguna pasatiempo");
}else{
window.open("datos_text.jsp?keyword=" + comp, "chooser", "toolbar=no, menubar=no, scrollbars=yes, width=800, height=600");
}
}
});
});
</script> |