Revision: 502
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 17, 2006 04:03 by perelin
Initial Code
function setSelectListToValue() { var i, si, v, args=setSelectListToValue.arguments; if ((obj=MM_findObj(args[1])) != null) { v = args[0]; // value nach dem gesucht wird //alert(v); for(i=0; i<obj.length; i++) { // alert(obj.options[i].value+' ist '+i); if(obj.options[i].value == v) { //alert(i); si = i // Wenn Option value = gesuchter value -> selectedindex speichern } } //alert(obj.length); obj.selectedIndex = si; } }
Initial URL
Initial Description
Initial Title
setSelectListToValue
Initial Tags
list
Initial Language
JavaScript