/    Sign up×
Community /Pin to ProfileBookmark

JSP <html:select> filtering

I have a JSP page that contains a textarea and a <html:select> tag that contains a few options to select from. Here’s what I wish to do: When I start typing on the textarea, I want the html:select tag options – that match what I’m entering – to be highlighted. Here’s a piece of the code:

[CODE]<html:text property=”metrics” style=”query-table-item” size=”50″/>
<html:select property=”metrics” multiple=”true” size=”5″ style=”width:450″ onfocus=”Select_Radio(document.searchReportForm.metricsSelect[0]);”>
<html:options collection=”metricsList” property=”id” labelProperty=”name”/>
</html:select>[/CODE]

Does anyone have any idea how to do this?

to post a comment
Java

1 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliSep 08.2005 — this is not Java, what you want is JavaScript.

[url=http://www.webapplikations.com/pages/html_js/forms/SearchValueInListBox.html]Here is a close example for what you want[/url]

The only thing u need to do is call the function that is called in search buttons on click event in the textfields onchange event.

If u have more questions regarding JS please post your question in JavaScript sections
×

Success!

Help @nAzGiRl2005 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...