Recent Topics

1 Apr 12, 2007 18:02    

My b2evolution Version: Not Entered

Hi, I have a programming blog where I like to post code examples.
However, sometimes the application refuses to post my message
"Parser error: > required near array los datos del combo for "

Here is my post:

function OrdernarComboAlfabeticamente(objCmb) {

arrDatos = new Array();

//Meto en el array los datos del combo

for(i=0; i<objCmb.length; i++) {
arrDatos[i] = new Array();
arrDatos[i][0] = objCmb.options[i].text;
arrDatos[i][1] = objCmb.options[i].value;
}

//Ordeno el array con el metodo sort de JS
arrDatos.sort();

//Reemplazo los datos del combo con el array ordenado
for(i=0; i<objCmb.length; i++) {
objCmb.options[i].text = arrDatos[i][0];
objCmb.options[i].value = arrDatos[i][1];
}


}

Thanks in advance,

Ezequiel


Form is loading...