Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pull-down menus: How to scroll down to first pre-selected option

 
Rick Portugal
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a form that has a pull-down menu. I am using the html:select tag and the html ptionsCollection tag for the pull-down menu.

There are many options and some of the options are pre-selected. Each time the user enters the form, he has to scroll through the list to tell which options are pre-selected. Is there any way to have the system automatically scroll down to the first pre-selected option?

Can that be done using some html:select option, or maybe native HTML?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rick Portugal:

Can that be done using some html:select option, or maybe native HTML?


Firstly, whether you use the JSP custom tags or not to create the form element, it is "native HTML" that is being sent to the browser. All the tags do for you is to compose the HTML; the browsers themselves know and see nothing but native HTML.

Secondly, there is no means that I am aware of to affect the behavior of the select element in the manner that you describe.

You might want to consider using a select list, as opposed to a dropdown, which shows more elements at a glance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic