combobox

D

Dropstengel

Hi
I have a simple form that just contains 1 combobox with several options.
There is no onSelect event that I can handle, right?
How can I implement this? The user selects one option and a new pops up...
When user select same option a new must pop up.

Frank
 
M

Michael Winter

I'll spare you the lecture of why pop-ups are bad. I'm sure you already
know it.
I have a simple form that just contains 1 combobox with several options.
There is no onSelect event that I can handle, right?

The select event is fired when the user selects text. The usual change and
click events apply to SELECT elements.
How can I implement this? The user selects one option and a new pops
up...
When user select same option a new must pop up.

Don't do that. The only elements that should cause an action, such as
navigation, are buttons. The user doesn't usually expect something to
happen just by selecting a value from a list.

In addition, just because the user has made a selection doesn't mean
that's actually their chosen value. Why? Users make mistakes. Moreover,
there are more ways to select from a SELECT element than just clicking a
value. Once the element has focus, the user can press a key to jump to the
first option that begins with that letter. In a list of countries, for
example, that first option is not likely to be the final choice. The user
can also use the cursor keys and the mouse wheel to scroll through the
list. Each one of these situations will act like a selection, but none of
them will be.

The solution? Use a button. Not only will this activate irrespective of
whether the value has changed, but it also provides a more concrete
interface.

Mike
 
D

Dropstengel

Michael Winter said:
I'll spare you the lecture of why pop-ups are bad. I'm sure you already
know it.


The select event is fired when the user selects text. The usual change and
click events apply to SELECT elements.


Don't do that. The only elements that should cause an action, such as
navigation, are buttons. The user doesn't usually expect something to
happen just by selecting a value from a list.

In addition, just because the user has made a selection doesn't mean
that's actually their chosen value. Why? Users make mistakes. Moreover,
there are more ways to select from a SELECT element than just clicking a
value. Once the element has focus, the user can press a key to jump to the
first option that begins with that letter. In a list of countries, for
example, that first option is not likely to be the final choice. The user
can also use the cursor keys and the mouse wheel to scroll through the
list. Each one of these situations will act like a selection, but none of
them will be.

The solution? Use a button. Not only will this activate irrespective of
whether the value has changed, but it also provides a more concrete
interface.

Mike

Thanks, I completely agree (I normally develop C++ applications for Windows
where UI forms about 60% of the whole application).
But, for my sister in law I'm writing some JavaScript code because it's part
of her study. And that excersise tells me to do this strange behaviour.....

Frank
 
M

Michael Winter

[snipped lecture on usability]
Thanks, I completely agree (I normally develop C++ applications for
Windows where UI forms about 60% of the whole application).

Yes, I know. It's a pain in the ass. :)
But, for my sister in law I'm writing some JavaScript code because it's
part of her study. And that excersise tells me to do this strange
behaviour.....

In that case, using the click event is probably the best way to go so that
the event fires on every selection.

I hope this "study" isn't a web design course. If it is, it's teaching bad
practice.

Good luck to you both,
Mike
 
D

Dropstengel

I hope this "study" isn't a web design course. If it is, it's teaching bad
practice.

No, something like "Informationservice-and management"
(Informatiedienstverlening en management in Dutch).
Horrible...
Good luck to you both,
Mike
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top