The Natural Philosopher said:
God, another religious pervert.
And hpow paty, wre borswer intended to be used?
If you look at what they are used for these days, and compare with the
original intention - the sharing of reasearch papers across the net,
then javascript itself is 'wrong'
Do you not understand the difference between a browser and
a browser element?
Oh my gawd.
I bet all our barbecues are very expensive, and run of bottled gas, and
you have never punched holes in an oil drum and fill it full of wood to
cook our steaks. "Wrong use of an oildrum".
Thank heavens yy weren;t there when someone forst used a log to roll a
stone down a slope 'wrong use of a log'
Your analogies are badly flawed, suggesting that you've missed
the point.
If, for example, you punched holes in an oil drum and filled it
full of wood and set it a storage room full of drums filled with
oil, that would be "wrong use of an oil drum", because it would
cause confusion to the users and create a headache for whoever
is responsible for maintaining that storage room.
I can tell you are PROBABLY some snotty computer scuentist escaped from
college.
I've been a software engineer working in the real world for (I
would assume) most of your lifetime.
I am an engineer: there is no right or wrong, there is what works, and
what doesn't. All engineering is the exploitation of unexpected
properties of the material world to achieve a specific aim.
Engineering also involves considering more than functionality.
You must consider usability, stability, maintainability,
portability, and a host of other "-ilities" that go far beyond
function. If you don't consider them, you're not an engineer.
If I want to put a single line of clickable text in a box that looks
like the multiple lines of clickable text in he other select boxes, that
is not WRONG.
If you implement it as a single option select control and have to
write hack code to make it work as you intend, and have to explain
to the users that this select control, unlike any other they've
used, actually functions like a pushbutton, then yes, it's wrong.
Using javascript with form input elements in *every* case is NOT what
the designers of form elements ever intended. Strictly one ought to
throw away the form elements and do the thing in pure javascript, but
that is non standard across browsers in so many ways..
Modern browsers were written with the intention of allowing
interaction with Javascript. They weren't written with the
intention that self-styled engineers would pervert the basic
usage models.
That is not what this code does. It splits options from a very long list
into sub lists, simply t make it easier to find the right option without
yards of scrolling.
On occasion, some of those sub lists contain just one element.
Then that is, indeed, "what this code does".
Yawn. YOU write some code that allows selection of *one* item and one
alone from several drop down lists one or more of which may contain only
one element.
Have you considered that drop down lists may not be the best
user interface for this task?
I found a way that has a consistent look and feel and works in all
browsers.
As an engineer, that is all I ask.
Then you're not an engineer.
That goes for almost everything one ever writes.
Are you saying that it isn't obvious to you that writing code to
make controls work in ways that they weren't intended to work is
inherently more likely to a maintenance issue?
MM. Unlikely in all cases. Since the use to which this particular form
is put involves the ability to draw CAD files. And deaf dumb and blind
idiots may be be able to play pinball, but they are remarkably rare in
CAD drafting.
You don't have to be deaf, dumb or blind to require accommodations.
I've known people to use CAD tools on special monitors and with
special input devices as accommodations.
Feel free to write me the 'proper' version..right now I have about
another 20 screens of code to write and no time frankly.
Don't worry. You, or your successor, will wind up writing it
correctly sooner or later.
--