Matthew Cox wrote:
Hi,
I've been searching the net all day today trying to figure out how one
would accomplish what I originally thought would be a fairly straight
forward and simple thing. The problem I'm trying to solve is that the
designer would like to limit the total number of entires shown when
you click on the drop-down arrow of a select box.
Even though that could only make sense in a very narrow set of
presentation layouts, strangely, there's a standard way to give a size
information (just a guideline) in HTML:
http://www.w3.org/TR/html4/interact/forms.html#h-17.6
This applies to list box representations, not to "drop-down boxes", but
user agents are free to interpret them as they wish.
Actually, IE6 behavior is to use a list box with N rows whenever SIZE=N is
specified, otherwise, a combo box is used, even when there's only one or
two options!
Opera 8.54, Mozilla 1.7, Netscape 1.22 & higher and 1X 1.0 share the same
behavior on Win32 as well as Opera and Dillo on GNU/Linux, but other
behaviors, such as the one of Elinks, are perfectly sane.
I'm starting to
think that this isn't possible.
It isn't. The designer cannot *limit* the total number of entries "viewed"
at once for any sense of the word "viewed". HTML isn't an imperative
language, it is a declarative language.
You can just give a guideline, interpreted or not, depending on whether it
makes sense to the user agent and whether the user agent or the user
wishes to accept this imposed value.
At some point in my browsing someone claimed that the vertical scroll
bars are controlled by the OS/Browser and there are no ways to change
this using JS or CSS.
With ActiveX, you can. But ActiveX is a quite offensive technology:
Executing arbitrary binary code on the client machine.
That the magic number of IE is 30 entries before
the vertical scroll bar shows up.
This probably depends on the OS and version of IE and maybe user settings,
screen resolution and font sizes.
With Windows 98 SE and IE6, for 12 or more entries, there's a scroll bar.
--
You can contact me at <ta*****************@yahoDELETETHATo.fr>