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


Groups > comp.lang.javascript > #18034

Re: Matching arbitrary pairs of elements

Message-ID <1494751.JhATDobLSb@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-01-09 18:24 +0100
Subject Re: Matching arbitrary pairs of elements
Newsgroups comp.lang.javascript
References <1kwe933.qjka3b5vluq5N%real-not-anti-spam-address@apple-juice.co.uk> <2021719.oBrLI1RlBM@PointedEars.de> <1kwfdkr.1b8rd88ahlfy8N%real-not-anti-spam-address@apple-juice.co.uk>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


D.M. Procida wrote:

> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>> D.M. Procida wrote:
>> > So far I have managed to come up with http://jsfiddle.net/j2xYs/ -
>> > which works, for one pair of select/input elements.
>> 
>> This is not the Web.  Surely you can also post a reduced test case here.
                                        ^^^^ 
> I wanted to show a working example.

Which is a good idea, but not sufficient.  Besides, if you had really used 
jQuery, it is debatable if one could reasonably call such an example 
“working”.

>> > What I'd like to do is amend my JS so that if <select id="[number]"> is
>> > changed to "show", then <input id="[number]"> will be shown, whatever
>> > [number] is.
>> 
>> Only if you declare and use HTML5, IDs are allowed to start with "[".
>> Otherwise they MUST NOT contain the "[" or "]" characters, and MUST NOT
>> start with a decimal digit either.
> 
> Of course, by "[number]" I just meant some number.

As “some number” will, without loss of generality, be a decimal number, it 
will start with a decimal digit.  So unless you are declaring and using 
HTML5, you will need to prefix at least one “_” or ASCII letter to it, as I 
did in my example.

<http://validator.w3.org/>
 
-- 
PointedEars

Twitter: @PointedEars2
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

Matching arbitrary pairs of elements real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2013-01-08 19:41 +0000
  Re: Matching arbitrary pairs of elements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-09 00:36 +0100
    Re: Matching arbitrary pairs of elements real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2013-01-09 11:46 +0000
      Re: Matching arbitrary pairs of elements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-09 18:24 +0100
    Re: Matching arbitrary pairs of elements John G Harris <niam@jghnorth.org.invalid> - 2013-01-09 16:34 +0000
  Re: Matching arbitrary pairs of elements "Leonardo Azpurua" <leonardo@exmvps.org> - 2013-01-08 23:11 -0430
    Re: Matching arbitrary pairs of elements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-16 12:49 +0100
      Re: Matching arbitrary pairs of elements Tim Streater <timstreater@greenbee.net> - 2013-01-16 12:47 +0000
        Re: Matching arbitrary pairs of elements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-16 14:27 +0100
          Re: Matching arbitrary pairs of elements Tim Streater <timstreater@greenbee.net> - 2013-01-16 13:52 +0000
            Re: Matching arbitrary pairs of elements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-16 18:48 +0100
              Re: Matching arbitrary pairs of elements Tim Streater <timstreater@greenbee.net> - 2013-01-16 17:58 +0000
              Re: Matching arbitrary pairs of elements John G Harris <niam@jghnorth.org.invalid> - 2013-01-17 14:30 +0000
  Re: Matching arbitrary pairs of elements Jeff North <jnorthau@yahoo.com.au> - 2013-01-10 13:11 +1100
  Re: Matching arbitrary pairs of elements real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2013-01-11 10:32 +0000
    Re: Matching arbitrary pairs of elements RobG <rgqld@iinet.net.au> - 2013-01-13 22:36 -0800

csiph-web