Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

question about "OPTGROUP"

 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you used <OPTGROUP> ? I have a few <OPTGROUP>, each contains several sub items using <OPTION>, I made the first <OPTGROUP>'s first item to be highlighted by default. Now, when the page is displayed, I find that it shows the first highlighted <OPTION> item in the toppest position, i.e I can't see the first <OPTGROUP> unless I scroll the bar upwards a little bit. This isn't exactly what I want, I want the first <OPTGROUP> to appear on the topest position and its 1st <OPTION> item is highlighted too.

Should I adjust the "size" parameter of the box ?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is because you are not allow to select it so that is why it is not in the view when the page is loaded.

Eric
 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
It is because you are not allow to select it so that is why it is not in the view when the page is loaded.

Eric



not exactly. I have any similar page but it shows from the topest <OPTGROUP>. I found the reason for this -- If I set it to be "single" selectable, then the firt <OPTGROUP> never appears unless you scroll up; if I set it to "multiple", then the first <OPTGROUP> always appears.

I don't know why. But is there any way to get it around to ensure the first <OPTGROUP> appear by default ?
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!