Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2021719.oBrLI1RlBM@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 09 Jan 2013 00:36:53 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Matching arbitrary pairs of elements Newsgroups: comp.lang.javascript References: <1kwe933.qjka3b5vluq5N%real-not-anti-spam-address@apple-juice.co.uk> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 65 NNTP-Posting-Date: 09 Jan 2013 00:36:54 CET NNTP-Posting-Host: 510b009f.newsspool3.arcor-online.net X-Trace: DXC=?CVTfYm8ef\@@RW1FjIB5SMcF=Q^Z^V3X4Fo<]lROoRQ8kF 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. See or . > Now in my interface there will be an arbitrary number of these pairs, > with matching numbered ids. > > What I'd like to do is amend my JS so that if 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. If you are not declaring and using HTML5, you could use the “name” attribute, though, which is backwards-compatible and allows both “[” and “]”, because it is of type CDATA. (The “name” attribute is allowed for “form” elements and form controls in HTML5 as well. However, for form controls HTML5 attaches special meaning to it.) > I'm sure this must be possible, but this is the first time I've tried to > do something in JS so I am not really sure where to start. You could start like this: (You should remove word-wrap in your code.) However, if there are only two choices, it is probably better to use a checkbox instead (and for three choices a radiobutton group, unless space is limited). See for more. > Thanks for any suggestions or advice, You are welcome. > Daniele You should put that in the sender (“From” header field value), too. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.