Jump to content

drop down menu


bphanisarma

Recommended Posts

hiI took the following code from w3schools java scripts examplesthis works finemy problem is when the list is displayed there are 3 names that starts with letter mwhen i will press m then the word with m should be high lighted when i press m and then i then the word with Mi should be displayednot the one with iis anybody have any idea abt itthanks byecode:<html><head><script type="text/javascript">function go() {window.location=document.getElementById("menu").value}</script></head><body><form><select id="menu" onchange="go()"> <option>--Select a page--</option> <option value="http://www.w3schools.com">W3Schools</option> <option value="http://www.microsoft.com">Microsoft</option> <option value="http://www.altavista.com">macrosoft</option><optionvalue="http://www.altavista.com">mpcrosoft</option></select></form></body></html>

Link to comment
Share on other sites

Drop down menus don't work like that. When you type a new letter it doesn't add it to the previous, but replaces it. So what you see happening is exactly what should be happening. I am not sure if there is a way to change it.

Link to comment
Share on other sites

Unless you put a textbox above it, or hold the keydown of anything on the dropdown in a variable [getting complicated]. But yeah.. I believe Google's experimental search drop-down does what you want, but it isn't using the default box, it's a custom made script.

Link to comment
Share on other sites

Thanks for the repliesBut i want to do something like MS word..there is menu in the top which selects style of words like times new roman ,tahoma etc....here in that when we press t, it displays the first word with letter t in menu..then if we press ti, it goes directly to the times.....is there any way i can do that.....do rep soonphani

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...