Code: Select all
<SCRIPT type="text/javascript">
function searchSel() {
var input = document.getElementById('realtxt').value.toLowerCase();
var output = document.getElementById('realitems').options;
for (var i = 0; i < output.length; i++) {
if (output[i].value.indexOf(input) == 0) {
output[i].selected = true;
}
if (document.forms[0].realtxt.value == '') {
output[0].selected = true;
}
}
}
</SCRIPT></HEAD><BODY>
<FORM>
Search <input type="text" id="realtxt" onkeyup="searchSel()" size="20">
<SELECT id="realitems">
<OPTION value="">Select...
<OPTION value="http://google.com">Google
<OPTION value="http://yahoo.com">Yahoo
<OPTION value="http://msn.com">MSN
</SELECT>
<input type="button"
onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;"
value="GO">
</p>
</form>