/    Sign up×
Community /Pin to ProfileBookmark

SELECT properties question

I have an especially long select drop down list. As it isn’t possible for me to shorten the list, we made it possible to autosearch — once you begin typing the name of the option you wish to select, it will jump to that option. However, I was wondering if it was possible to center the drop down list around the autosearched-for item? Currently, if the item searched for is below the current selection, it will be highlighted at the bottom of the drop down menu, and if the item searched for is above the current selection it will be highlighted at the top of the menu.

Thanks for any help!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsAug 05.2005 — if say the match(matchnu) is at option 10 (matchnu=10)

somthing like

obj.size=10;

if (matchnu-5>0){

obj.selectedIndex=matchnu-5;

}
×

Success!

Help @MNelson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...