HighDots Forums  

2nd click ineffective in drop-down list

Javascript JavaScript language (comp.lang.javascript)


Discuss 2nd click ineffective in drop-down list in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bernard Philip
 
Posts: n/a

Default 2nd click ineffective in drop-down list - 08-04-2003 , 08:20 AM






hey everybody
i have a dropdown list opening a window, ie
<SELECT onchange=openwindow()..>
<OPTION value=....
<..choice1..>
<..choice2..>
when clicking on an choice

if i clear this window, and click again
on the same choice, nothing happens
i must click another choice, and then
come back on the first, which runs

any medicine to allow a 2nd click on the same choice ?

thnx a lot
sorry for my english
Bernard, from France

Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 08:27 AM








Bernard Philip wrote:
Quote:
hey everybody
i have a dropdown list opening a window, ie
SELECT onchange=openwindow()..
OPTION value=....
..choice1..
..choice2..
when clicking on an choice

if i clear this window, and click again
on the same choice, nothing happens
i must click another choice, and then
come back on the first, which runs

any medicine to allow a 2nd click on the same choice ?
You could deselect the option
<select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.

--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
  #3  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 09:31 AM



Martin Honnen <Martin.Honnen (AT) t-online (DOT) de> writes:

Quote:
You could deselect the option
select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.
And people navigating with a keyboard will be completely lost, not
just highly annoyed as by the original solution.

Don't overuse the onchange event on selectboxes, some people will have
to go through several choises before they reach the one they want.

/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'


Reply With Quote
  #4  
Old   
Bernard Philip
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 10:14 AM



On Mon, 04 Aug 2003 14:27:40 +0200, Martin Honnen
<Martin.Honnen (AT) t-online (DOT) de> wrote:

Quote:

Bernard Philip wrote:
hey everybody
i have a dropdown list opening a window, ie
SELECT onchange=openwindow()..
OPTION value=....
..choice1..
..choice2..
when clicking on an choice

if i clear this window, and click again
on the same choice, nothing happens
i must click another choice, and then
come back on the first, which runs

any medicine to allow a 2nd click on the same choice ?

You could deselect the option
select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.
thnx a lot for your quick answer, Martin,
and congratulations, it runs
(the name inside the dropdown-box
is blank the 2nd time, but it seems a small problem)

best regards


Reply With Quote
  #5  
Old   
Bernard Philip
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 10:17 AM



On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen
<lrn (AT) hotpop (DOT) com> wrote:

Quote:
Martin Honnen <Martin.Honnen (AT) t-online (DOT) de> writes:

You could deselect the option
select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.

And people navigating with a keyboard will be completely lost, not
just highly annoyed as by the original solution.

Don't overuse the onchange event on selectboxes, some people will have
to go through several choises before they reach the one they want.

when using mouse only, the solution proposed by Martin seems ok for me
why do you use keyboard ? quicker ? mouse broken ?
regards
B.



Reply With Quote
  #6  
Old   
Richard Hockey
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 10:45 AM




"Bernard Philip" <bernard.philip (AT) nospam (DOT) fr> wrote

Quote:
On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen
lrn (AT) hotpop (DOT) com> wrote:

Martin Honnen <Martin.Honnen (AT) t-online (DOT) de> writes:

You could deselect the option
select onchange="openwindow(); this.selectedIndex = -1;"
that way the user has to select the option again and the browsers
recognizes a change that triggers onchange.

And people navigating with a keyboard will be completely lost, not
just highly annoyed as by the original solution.

Don't overuse the onchange event on selectboxes, some people will have
to go through several choises before they reach the one they want.

when using mouse only, the solution proposed by Martin seems ok for me
why do you use keyboard ? quicker ? mouse broken ?
How about you are blind or partially sighted, and you use a screenreader to
access the web page, controlling it via the keyboard?

Quote:
regards
B.




Reply With Quote
  #7  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 10:57 AM



Bernard Philip <bernard.philip (AT) nospam (DOT) fr> writes:

Quote:
when using mouse only, the solution proposed by Martin seems ok for me
why do you use keyboard ? quicker ? mouse broken ?
regards
I don't, but there are people who do. Some because they like it
better, others because they have a physical condition that prevents
them from using a mouse.

/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'


Reply With Quote
  #8  
Old   
HikksNotAtHome
 
Posts: n/a

Default Re: 2nd click ineffective in drop-down list - 08-04-2003 , 07:37 PM



In article <k79t79no.fsf (AT) hotpop (DOT) com>, Lasse Reichstein Nielsen <lrn (AT) hotpop (DOT) com>
writes:

Quote:
when using mouse only, the solution proposed by Martin seems ok for me
why do you use keyboard ? quicker ? mouse broken ?
regards

I don't, but there are people who do. Some because they like it
better, others because they have a physical condition that prevents
them from using a mouse.
Ever tried filling out forms with a mouse? I can navigate the form quicker, and
fill it out quicker, with my keyboard than I can my mouse. Not to mention, when
I encounter a webpage that has dates in select lists, and I have to choose my
birthday, it gets annoying to scroll to the bottom to find december, then
scroll to near the bottom to find 22, then scroll almost to the bottom to find
1966. All of which I can do a lot quicker with my keyboard than my mouse. There
is more to keyboard navigation than just disabilities.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.