HTML Select element: How to show drop-down list by clicking only once

S

Stefan Mueller

The following URL shows a HTML page with 3 Select elements (see code
below):
http://test.seekware.ch/test/

If you use Internet Explorer...
... Section 1 (no color change) always shows the drop-down list by
clicking once.

... Section 2 (color change only the first time) shows the first time
the drop-down list only after clicking twice. Afterwards each click
shows the drop-down list.

... Section 3 (color change each time) shows the drop-down list
always only after clicking twice.

Is there a way (e.g. with Java scripts) to enforce the Internet
Explorer to show each drop-down list always by clicking once?

Any information is very appreciated
Stefan

PS: With Opera each drop-down list is shown by clicking only once.
Perfect! In Mozilla Firefox each drop-down list is shown the same way.
Unfortunately you always have to click them twice (first click closes
the previous drop-down list). I don't like this but I guess it works
as designed and Mozilla users are used to it. Or is there a way to
change this behavior?


= = = = = = = = = = = =

Code of HTML page (http://test.seekware.ch/test/)

<html>
<head>
<style type = "text/css">
select.stil_not-selected {
background-color: #ffffff;
}

select.stil_selected {
background-color: #888888;
}
</style>
</head>

<body>
<select style = "width:100px">
<option value = "">Selection 1
<option value = "">1
<option value = "">2
<option value = "">3
</select>

<select style = "width:100px"
onFocus = "className = 'stil_selected'"
onBlur = "className = 'stil_selected'">
<option value = "">Selection 2
<option value = "">1
<option value = "">2
<option value = "">3
</select>

<select style = "width:100px"
onFocus = "className = 'stil_selected'"
onBlur = "className = 'stil_not-selected'">
<option value = "">Selection 3
<option value = "">1
<option value = "">2
<option value = "">3
</select>
</body>
</html>
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top