• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67596
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic