It sounds like you're violating a basic rule of the DOM: ids must be unique across the document. If you have duplicate ids, you're violating standards.
Once you solve that issue, your best bet is to select multiple elements with Prototype's $$() function. http://prototypejs.org/api/utility#method-$$ TAG On Apr 14, 2008, at 8:34 AM, chich wrote: > > How can I control a div from a javascript function. > For example if i have a product and has an id=8 and this product has 3 > trainees > so when i click on something i should see the 3 trainees name for > this product. > in the code i created a div with id="T<?=product_id?>" (id=T8) class > ="LINKSOFF" (hidden) > how can i turn the class to class="LINKSON" from a javascript > function. > The problem is that when i have many div with the same id and write > class="LINKSON" i can not see the div. > > --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---