holas,
Me intrigo tu caso (o andaba muy aburrida no se jajaja)
Lo hice así:
Código Javascript
:
Ver originalfunction selectAll(){
var strValues = "";
var count = 0;
for ( i = 0; i < document.choiceForm.choiceBox.options.length; i++ ){
document.choiceForm.choiceBox.options[i].selected = true;
if (count == 0) {
strValues = document.choiceForm.choiceBox.options[i].value;
}
else {
strValues = strValues + "," + document.choiceForm.choiceBox.options[i].value;
}
count++;
document.choiceForm.valores.value = strValues;
}
document.choiceForm.submit();
}
En el formulario agrego un campo hidden que se llama valores, y lo recibo, así:
Código PHP:
Ver original<?php
$array = explode(",",$_POST["valores"]); foreach ($array as $indice => $valor){
echo "indice: ".$indice." => ".$valor."<br>";
}
?>
Esto porque los arreglos no los trabajo igual JavaScript que PHP, entonces hago una especie de recolección con lo que haces, y al final solo lo divido con PHP :D
saludos!! (Y gracias por el entretenimiento xD)