sorry about the repeated response... apparently my phone's email client had not 
updated new messages.



-----Original Message-----
Date: Sunday, June 21, 2009 1:46:13 pm
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
From: "Stuart" <stuart.ga...@googlemail.com>
Subject: [Proto-Scripty] Re: Need help with getValue


Stunning answer

Worked first time.  Marvelous.  I'm speechless.

Thanks a million.


On Jun 21, 12:54 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi Stuart,
>
> The id attribute _must_ be unique within the page, that's part of the
> HTML standard.  You can have multiple inputs with the same name
> attribute, but not the same id.  When adding the further inputs,
> you'll need to give them unique ids like 'forename0', 'forename1',
> 'forename2', etc.  Once they have unique IDs, then you can use $F to
> retrieve them.
>
> In terms of finding the values for all of them, the great thing is
> that Prototype provides CSS3 attribute substring selectors[1] even if
> the underlying browser doesn't.  So you can do this:
>
> var inputs = $$('input[id^=forename]');
>
> ...to get an array of the form elements whose ID _starts with_
> 'forename', although doing it only within the form element might be
> faster:
>
> var inputs = $('myForm').select('input[id^=forename]');
>
> Quite e


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to