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


Groups > comp.lang.javascript > #25643

Re: element content change

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: element content change
Date 2014-08-06 20:27 +0100
Organization A noiseless patient Spider
Message-ID <87wqalo1v6.fsf@bsb.me.uk> (permalink)
References <ba13e4c4-70c8-4e8d-9a39-9c3bfecf4f6f@googlegroups.com> <xuWdnZJt5KHAGXzOnZ2dnUVZ_iydnZ2d@westnet.com.au> <87y4v2qtia.fsf@bsb.me.uk> <lrs8h2$i1i$1@dont-email.me>

Show all headers | View raw


"Jukka K. Korpela" <jkorpela@cs.tut.fi> writes:

> 2014-08-06 4:47, Ben Bacarisse wrote:
>
>> What's more, HTML even defines an element whose role is
>> to be a label for a form element: label:
>>
>>    <input type=text id=city><label for=city id=citylabel></label><br>
>
> (The id=citylabel attribute is usually unnecessary, unless you need a
> quick way to refer to the particular element in JavaScript or in CSS.)

Sure, but that's exactly the context here.

> And this implies some usability features that may be essential to some
> users.
>
> What’s more, you should make sure that the label text appears in the
> HTML document, so you should generate it server side, not with
> client-side JavaScript, which seems to be what is used here. The
> reason is that when done client-side, it will not work when JavaScript
> is disabled in the browser. You should never rely on JavaScript being
> enabled unless you have to (as you have to if you are specifically
> creating an “HTML5 application” where all the functionality is coded
> in JavaScript).

All very true and, to be honest, I thought all these thoughts but I was
too lazy to type them all up.  Thanks for being more conscientious than
I was.

-- 
Ben.

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


Thread

element content change teddybubu@gmail.com - 2014-08-05 17:05 -0700
  Re: element content change Andrew Poulos <ap_prog@hotmail.com> - 2014-08-06 11:23 +1000
    Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-06 02:47 +0100
      Re: element content change "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-08-06 06:47 +0300
        Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-06 20:27 +0100
      Re: element content change "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-06 15:16 +0200
        Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-06 20:37 +0100
          Re: element content change "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-08-06 23:19 +0300
            Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-06 21:54 +0100
              Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-06 21:59 +0100
            Re: element content change "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-07 00:59 +0200
              Re: element content change "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-08-07 08:28 +0300
                Re: element content change Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-07 11:42 +0100
                Re: element content change "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-08 18:48 +0200
          Re: element content change "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-07 00:54 +0200
  Re: element content change teddybubu@gmail.com - 2014-08-05 19:36 -0700
    Re: element content change Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2014-08-06 08:52 +0200
  Re: element content change Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-06 12:52 +0000
  Re: element content change teddybubu@gmail.com - 2014-08-06 05:58 -0700

csiph-web