Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.javascript Subject: Re: Appropriate event for change of a HTML selection list Date: Wed, 5 Apr 2017 15:22:22 +0200 Organization: Aioe.org NNTP Server Lines: 32 Message-ID: References: <9dce161f-65f8-49bd-8b35-220bfe279705@googlegroups.com> NNTP-Posting-Host: 2qJ3FXO174raefyJu7iz0A.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 X-Enigmail-Draft-Status: N1110 Xref: csiph.com comp.lang.javascript:32941 On 04.04.2017 21:05, Julio Di Egidio wrote: > On Tuesday, April 4, 2017 at 7:44:41 PM UTC+2, Janis wrote: >> This post is (primarily) about which javascript event function should be >> used in the context of a HTML selection list, and (secondarily) whether >> there's a suggestion for a different approach. > > Change the (view) model, let the UI reflect the model. > > Start by learning Knockout: . > > Have fun. Thanks, Julio. I'd rather not want to redesign the whole code to solve a comparably simple technical detail, though.[*] I also want to avoid introducing third party lib's. - Sorry for not having been clear about that. I'm aware that me asking for a "different approach" might invite responses that include suggestions of arbitrary complexity or effort. This was not my (primary) concern. But thanks anyway for the knockoutjs pointer. If common opinion is that the intended primitive task is not solvable in any simple way that's also okay for me, since (as I said upthread) I could implement a staightforward and simple workaround. Janis [*] The library link you gave refers to "Model View Viewmodel" and Wikipedia says: "A criticism of the pattern comes from MVVM creator John Gossman himself, who points out overhead in implementing MVVM is "overkill" for simple UI operations."