The syntax of you selector is waaay off...
// $$(''[id^="tsum["]''); should be something like
this:
$$(''*[id^=tsum]'');
also... you can''t call substring on an element, you have refer to the
id of that element
elements[i].id.substring(4)
On Nov 10, 11:40 am, "reta...-Mmb7MZpHnFY@public.gmane.org"
<reta...-Mmb7MZpHnFY@public.gmane.org> wrote:> i iterate this elements but i dont get th key:( No error but the script
> do nothing when i call the id on this way:(
>
> var elements =
$$(''[id^="tsum["]'');
>
> for (i = 0; i < elements.length; i++)
> {
> alert(''id key: '' +
elements[i].substring(4) + '' value: '' +
> elements[i].innerHTML)
> }
>
> ____________
> Virus checked by G DATA AntiVirusKit
> Version: AVK 18.481 from 10.11.2007
> Virus news:www.antiviruslab.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---