[Proto-Scripty] Re: get controls array

2009-07-26 Thread T.J. Crowder
Hi, > obviously that I'll never have really an array of controls... but if I > get an array when I use getElementsByName() If you have the brackets in the names, getElementsByName isn't going to get you the elements either: HTML: JavaScript: var list = document.getElementsByName('test');

[Proto-Scripty] Re: get controls array

2009-07-25 Thread diegoturriaga
maybe I haven't explained well (my English is not good) or I'm reading or translating wrong the answers obviously that I'll never have really an array of controls... but if I get an array when I use getElementsByName() my question was whether to "prototype" implements a short call to do the same

[Proto-Scripty] Re: get controls array

2009-07-24 Thread ColinFine
On Jul 24, 1:02 am, diegoturriaga wrote: > Well... first that all thanks for your reply! > > I'm trying to use a multidemensional javascript array... various > arrays of input controls of type checkbox > > I have 10 controls with name "myarray[1][]" > other 10 controls with name "myarray[2][]"

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Douglas
Did you read the given references? On Thu, Jul 23, 2009 at 9:02 PM, diegoturriaga wrote: > > Well... first that all thanks for your reply! > > I'm trying to use a multidemensional javascript array... various > arrays of input controls of type checkbox > > I have 10 controls with name "myarray[1][

[Proto-Scripty] Re: get controls array

2009-07-23 Thread diegoturriaga
Well... first that all thanks for your reply! I'm trying to use a multidemensional javascript array... various arrays of input controls of type checkbox I have 10 controls with name "myarray[1][]" other 10 controls with name "myarray[2][]" other 10 controls with name "myarray[3][]" ... other 10

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Matt Foster
Hey Diego, I'd suggest learning CSS, in particular CSS Selectors. Second read up on prototype, you were a dollar sign away from almost having it. In your case, the name is too inconsistent, you could have almost gotten away with $$("input[name~=opt") but alas there is no space after it so

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Douglas
I'd use classes instead // The '$$' reference: http://www.prototypejs.org/api/utility/dollar-dollar On Thu, Jul 23, 2009 at 6:50 PM, diegoturriaga wrote: > > I have something like that: > >