2nd click ineffective in drop-down list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bernard Philip

    2nd click ineffective in drop-down list

    hey everybody
    i have a dropdown list opening a window, ie
    <SELECT onchange=openwi ndow()..>
    <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
  • Martin Honnen

    #2
    Re: 2nd click ineffective in drop-down list



    Bernard Philip wrote:[color=blue]
    > hey everybody
    > i have a dropdown list opening a window, ie
    > <SELECT onchange=openwi ndow()..>
    > <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 ?[/color]

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

    --

    Martin Honnen


    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: 2nd click ineffective in drop-down list

      Martin Honnen <Martin.Honnen@ t-online.de> writes:
      [color=blue]
      > You could deselect the option
      > <select onchange="openw indow(); this.selectedIn dex = -1;"
      > that way the user has to select the option again and the browsers
      > recognizes a change that triggers onchange.[/color]

      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@hotpop.com
      Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Bernard Philip

        #4
        Re: 2nd click ineffective in drop-down list

        On Mon, 04 Aug 2003 14:27:40 +0200, Martin Honnen
        <Martin.Honnen@ t-online.de> wrote:
        [color=blue]
        >
        >
        >Bernard Philip wrote:[color=green]
        >> hey everybody
        >> i have a dropdown list opening a window, ie
        >> <SELECT onchange=openwi ndow()..>
        >> <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 ?[/color]
        >
        >You could deselect the option
        > <select onchange="openw indow(); this.selectedIn dex = -1;"
        >that way the user has to select the option again and the browsers
        >recognizes a change that triggers onchange.[/color]
        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

        Comment

        • Bernard Philip

          #5
          Re: 2nd click ineffective in drop-down list

          On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen
          <lrn@hotpop.com > wrote:
          [color=blue]
          >Martin Honnen <Martin.Honnen@ t-online.de> writes:
          >[color=green]
          >> You could deselect the option
          >> <select onchange="openw indow(); this.selectedIn dex = -1;"
          >> that way the user has to select the option again and the browsers
          >> recognizes a change that triggers onchange.[/color]
          >
          >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.
          >[/color]
          when using mouse only, the solution proposed by Martin seems ok for me
          why do you use keyboard ? quicker ? mouse broken ?
          regards
          B.

          Comment

          • Bernard Philip

            #6
            Re: 2nd click ineffective in drop-down list

            On Mon, 04 Aug 2003 14:39:00 +0200, Martin Honnen
            <Martin.Honnen@ t-online.de> wrote:
            [color=blue]
            >
            >
            >Bernard Philip wrote:[color=green]
            >> hey everybody
            >> i have a dropdown list opening a window, ie
            >> <SELECT onchange=openwi ndow()..>
            >> <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 ?[/color]
            >
            >With Netscape 6/7 and with Opera 7 you could use onclick instead of
            >onchange and do the following
            >
            ><html>
            ><head>
            ><title>selec t and onclick</title>
            ><script type="text/javascript">
            >function showSelectedOpt ion (select, evt) {
            > if (select != evt.target) {
            > var selectedOption = select.options[select.selected Index];
            > if (selectedOption ) {
            > alert(selectedO ption.text + '; ' + selectedOption. value);
            > }
            > }
            >}
            ></script>
            ></head>
            ><body>
            ><p>
            ><select onclick="showSe lectedOption(th is, event);">
            ><option value="http://www.kibo.com/">Visit GOD</option>
            ><option value="http://www.lancearmstr ong.com/">Visit the bike GOD</option>
            ></select>
            ></p>
            ></body>
            ></html>
            >
            >It doesn't work with IE however[/color]
            IE is the target for my pages,
            so I prefer your 1st solution (index=-1)

            thnx again, Martin
            Bernie, from Paris

            Comment

            • Richard Hockey

              #7
              Re: 2nd click ineffective in drop-down list


              "Bernard Philip" <bernard.philip @nospam.fr> wrote in message
              news:1jqsiv4tqf rv1vkiqd8futo9e 0naqmie32@4ax.c om...[color=blue]
              > On 04 Aug 2003 15:31:45 +0200, Lasse Reichstein Nielsen
              > <lrn@hotpop.com > wrote:
              >[color=green]
              > >Martin Honnen <Martin.Honnen@ t-online.de> writes:
              > >[color=darkred]
              > >> You could deselect the option
              > >> <select onchange="openw indow(); this.selectedIn dex = -1;"
              > >> that way the user has to select the option again and the browsers
              > >> recognizes a change that triggers onchange.[/color]
              > >
              > >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.
              > >[/color]
              > when using mouse only, the solution proposed by Martin seems ok for me
              > why do you use keyboard ? quicker ? mouse broken ?[/color]

              How about you are blind or partially sighted, and you use a screenreader to
              access the web page, controlling it via the keyboard?
              [color=blue]
              > regards
              > B.
              >[/color]


              Comment

              • Lasse Reichstein Nielsen

                #8
                Re: 2nd click ineffective in drop-down list

                Bernard Philip <bernard.philip @nospam.fr> writes:
                [color=blue]
                > when using mouse only, the solution proposed by Martin seems ok for me
                > why do you use keyboard ? quicker ? mouse broken ?
                > regards[/color]

                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@hotpop.com
                Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
                'Faith without judgement merely degrades the spirit divine.'

                Comment

                • HikksNotAtHome

                  #9
                  Re: 2nd click ineffective in drop-down list

                  In article <k79t79no.fsf@h otpop.com>, Lasse Reichstein Nielsen <lrn@hotpop.com >
                  writes:
                  [color=blue][color=green]
                  >> when using mouse only, the solution proposed by Martin seems ok for me
                  >> why do you use keyboard ? quicker ? mouse broken ?
                  >> regards[/color]
                  >
                  >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.[/color]

                  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.

                  Comment

                  Working...