Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15058

Re: Either Chrome is crazy or *I* am :(

Newsgroups comp.lang.javascript
Subject Re: Either Chrome is crazy or *I* am :(
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <a6efohFhqlU1@mid.individual.net> <45e408tamu0ffkd3m24i4it2g6dtc205dh@4ax.com> <a6evcaFk3jU1@mid.individual.net> <a6g834FrofU1@mid.individual.net> <jtus8e$pc4$1@dont-email.me>
Message-ID <XnsA091C238518EBeejj99@194.109.133.133> (permalink)
Date 2012-07-15 17:05 +0000

Show all headers | View raw


Matt McDonald wrote on 15 jul 2012 in comp.lang.javascript:

> On 12-07-15 10:05 AM, Mel Smith wrote:
> 
>> Again, when one 'clicks' around an  <option> near the bottom (e.g.,
>> value=3177), then Chrome does *not* even enter the 'onclick' function.
> 
> Alas, you are the crazy one in this situation. Do not rely upon
> the "click" event for select elements. I made this mistake as
> a novice years ago, except with option elements.

Indeed.

The click could be interpreted as an action before you choose an option,
tricky crossbrowser-wize.

===========

And do not use event to find the value of the selection,
use this [and .value in the function] or this.value.

Try:

<select onchange='executeResult(this.value)'>
<option value="3101">Anderson, Harry</option>

==========

And do not disable an option but reject the result in your script:

<option value="X" selected>1. Select Members</option>

function executeResult(r) {
   if (r == 'X') return; // no action taken!
   ......


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-14 18:04 -0600
  Re: Either Chrome is crazy or *I* am :( Jeff North <jnorthau@yahoo.com.au> - 2012-07-15 13:29 +1000
    Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-14 22:31 -0600
      Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-15 10:05 -0600
        Re: Either Chrome is crazy or *I* am :( Matt McDonald <matt@fortybelow.ca> - 2012-07-15 10:48 -0600
          Re: Either Chrome is crazy or *I* am :( "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-07-15 17:05 +0000
            Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-15 12:49 -0600
          Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-15 12:41 -0600
  Re: Either Chrome is crazy or *I* am :( SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-07-16 17:46 +0200
    Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-16 10:14 -0600
      Re: Either Chrome is crazy or *I* am :( Christoph Becker <cmbecker69@gmx.de> - 2012-07-16 19:31 +0200
        Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-16 12:21 -0600
          Re: Either Chrome is crazy or *I* am :( Christoph Becker <cmbecker69@gmx.de> - 2012-07-16 20:44 +0200
            Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-16 15:07 -0600
      Re: Either Chrome is crazy or *I* am :( SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-07-17 01:47 +0200
        Re: Either Chrome is crazy or *I* am :( "Mel Smith" <med_cutout_syntel@aol.com> - 2012-07-30 13:31 -0600

csiph-web