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


Groups > comp.lang.javascript > #26092

Re: Prevent Drop-downs from showing

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Prevent Drop-downs from showing
Date 2014-11-07 13:56 +0100
Organization PointedEars Software (PES)
Message-ID <9271849.S5ITpJ9GIt@PointedEars.de> (permalink)
References <37302ad5-2e60-4a3a-ab43-9c3bbb95ac5c@googlegroups.com> <XnsA3DE5A5541384eejj99@194.109.133.133>

Show all headers | View raw


Evertjan. wrote:

> DrKen <javajedi2@yahoo.com> wrote on 07 nov 2014 in comp.lang.javascript:
>>    I'm no expert at JavaScript, and I would like a little guidance on
>>    how to check the country drop-down value as soon as it is selected.
> 
> use <select onchange='..'
> 
> [This part is just html]

The “click” event and the “input” event (DOM 3 Events, HTML5) also need to 
be handled because the “change” event may not fire before the element loses 
focus.  This is one of the cases where defining event listeners dynamically 
is warranted, to avoid code duplication.

<http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents>
<http://www.w3.org/TR/DOM-Level-3-Events/#event-type-click>
<http://www.w3.org/TR/DOM-Level-3-Events/#event-type-input>
<http://www.w3.org/TR/2014/REC-html5-20141028/forms.html#common-input-element-events>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


Thread

Prevent Drop-downs from showing DrKen <javajedi2@yahoo.com> - 2014-11-06 19:34 -0800
  Re: Prevent Drop-downs from showing "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-11-07 08:52 +0100
    Re: Prevent Drop-downs from showing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-07 13:56 +0100
    Re: Prevent Drop-downs from showing Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-11-07 15:53 -0200
      Re: Prevent Drop-downs from showing "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-11-07 21:43 +0100
        Re: Prevent Drop-downs from showing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-08 01:56 +0100
  Re: Prevent Drop-downs from showing Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-08 14:08 +0000
    Re: Prevent Drop-downs from showing Tim Streater <timstreater@greenbee.net> - 2014-11-08 18:08 +0000
      Re: Prevent Drop-downs from showing "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-08 19:47 +0100
        Re: Prevent Drop-downs from showing Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-08 21:20 +0000

csiph-web