Code:
for(var y = 0; y < transit_modes.length; y++) {	
	var small = transit_modes[y].toLowerCase();
	var mode_opt = new Option(transit_modes[y], small);

	if(method != null && method != "") {
		if(method == small) {		
			mode_opt.setAttribute("selected", "selected");
		}
	}
	tModeSel.options[tModeSel.options.length] = mode_opt;
}
Hi,

Consider the following options in the above tModeSel select element:
1 -> <emtpy>
2 -> Air
3 -> Ocean

After the user picks one of the above options and after submitting an AJAX form (page doesn't refresh) i am trying to re-set the value the user has chosen as the selected value/option of the above select element.
The above code works in "all" browsers (opera 9.23, IE7, Firefox 2.x.x & Safari 3.x.x Windows) but it doesn't work for IE6, where it set the previous Option as the selected one.
i.e. if user chooses "Ocean" after updating the page, IE6 comes up with "Air" selected...

Any ideas please?

thanks in advance