i have a text and i have to verify the combo box values ,and if it is exists then we have to show tht as a selected item example have a string “red” i have to verify colors combo for red if it is found i have to show tht was as a selected item in combo box
function Sel(ip,sel){ sel=document.getElementById(sel); sel.selectedIndex=0; var opts=sel.options; for (var zxc0=0;zxc0<opts.length;zxc0++){ if (opts[zxc0].value==ip.value){ sel.selectedIndex=zxc0; break; } }