Hi All
I need help in making a Drop down search box
I have dropdown HTML code and also Search Box HTML code, could you please help me in making both as one
I made sample code but not sure why its not working, please do the need full
<HTML><HEAD><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>
</BODY></HTML>
My Idea is when I start typing in search box the name (like google), drop list box should also change and when clicked on GO should go to the following link