Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/08/2005, 10:22
Avatar de caricatos
caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 2 meses
Puntos: 1284
A ver si te sirve:

Código:
function ordenar()	{
	with (document.forms["tuForm"]["tuSelect"])	{
		for (var i = 0; i < options.length - 1; i ++)
			if (options[i].text <= options[i + 1].text)	{
				temptext = options[i].text;
				tempvalue = options[i].value;
				options[i].text = options[i + 1].text;
				options[i].value = options[i + 1].value;
				options[i + 1].text = temptext;
				options[i + 1].value = tempvalue;
			}
	}
}
No utiliza métodos especiales, porque no creo que sea necesario.

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo