Mandanos "addCampo()" para ver como creas el array....
Mientras esto te puede dar pistas....
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
var matriu=new Array(5);
function inserta(){
for (i=0;i<5;i++){
var parell=new Array(2);
parell[0]=document.getElementById("c"+i).value;
if (document.getElementById("v"+i).checked){
parell[1]=true;
}else{
parell[1]=false;
}
matriu[i]=parell;
}
}
function mostra(){
var resultat="";
for (i=0;i<5;i++){
resultat+=matriu[i][0] + " " + matriu[i][1] + "<br>";
}
document.getElementById("resultats").innerHTML=resultat;
}
</script>
</head>
<body>
<form action="" method="get" name="form1">
<input name="c0" type="text" id="c0" value="1"> <input name="v0" type="checkbox" id="v0" value="false"><br>
<input name="c1" type="text" id="c1" value="2"> <input name="v1" type="checkbox" id="v1" value="false"><br>
<input name="c2" type="text" id="c2" value="3"> <input name="v2" type="checkbox" id="v2" value="false"><br>
<input name="c3" type="text" id="c3" value="4"> <input name="v3" type="checkbox" id="v3" value="false"><br>
<input name="c4" type="text" id="c4" value="5"> <input name="v4" type="checkbox" id="v4" value="false"><br>
<input name="" type="button" onClick="inserta();mostra()" value="Enter">
</form>
<span id="resultats"> </span>
</body>
</html>
Quim