OK guys,
think I solved it by spending a little more time.
Instead of using Ruby code for looping, I used js enflation with the 
page << command.
This is what did it for me:
  <%= link_to_function "Add Child" do |page|
    page << "for(i=$('from_pl').value;i<=$('to_pl').value;i++) {"
    page.insert_html :bottom, :percentages, :partial => 'percentage', 
:object => MatchPercentage.new
    page << "}"
  end %>
Posting it as maybe someone else will need it.
Cheers
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to