On 31 March 2011 16:17, Tobias H. <[email protected]> wrote: > Hey guys, > > I tried the following (in a RJS-Template), but it doesn't work: > > page[:ma].select('select#makro_ma_attributes__algorithm_id').each do > |sa| > puts sa.getValue > end > > > => i want to loop over all selectboxes and read out the value with RJS > > => "ma" is a div tag which contains many other div tags > => every div tag in "ma" contains one selectbox > => every selectbox contains the id "makro_ma_attributes__algorithm_id"
It is not valid html to use an id more than once on a page. Run the page through the w3c html validator and make sure the html is valid before trying to get the script to run. Then run it in firefox with the firebug addon to see if the script generates errors. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

