views:

22

answers:

1

Well, Its one of those common feature you have in all website with Select tags. I have a list of countries in a select tag. Now, I want that, if I press 'I' from keyboard, the first Country names that start with 'I' will get selected.. I tried some java script fount in internet. but they didn't work..

A snippet will be of immense help. :)

+1  A: 

I'm not aware of any browser in common use that doesn't support that as a standard feature of its implementation of a select element.

You don't need JavaScript, they just work that way.

David Dorward
+1, *they just work that way...* unless you're stupid enough to prepend spaces to each option text like I've seen on some websites. I hate that!
Andy E
Ohkay. But you see, My list consists of a hell lot of options. So instead of keeping them in source page, I'm keeping them in a php page(I'm working on php), and just echoing them in the main page as html code.And its not working out that way.
Bibhas
The client (i.e. the browser) cannot know and does not care if the HTML was provided by a static file or a server side program. It requests a URI and gets an HTML document, that is all.
David Dorward