Swap ComboxBox Values

Use this when the choices for both field will be the same and you want to have a function that swaps them.

function swapsort( id1, id2 ) {
	var fld1 = document.getElementById(id1);
	var index1 = fld1.options.selectedIndex;
	var fld2 = document.getElementById(id2);
	var index2 = fld2.options.selectedIndex;
	fld1.options[index2].selected = true;
	fld2.options[index1].selected = true;

Posted by fbrefere001 on Wednesday November 27, 2013