In my nested form I have a link to open a popup with selections. When a selection is made, the popup closes and the selection is added to a text box. Because I have objects that can be dynamically created in the form I can''t just use the id of the object to assign the selection to the input text box. I have this in my view <td><%= f.text_field :couchetype, :readonly=>true%></td> <td><%link_to( image_tag(''more.png'', :border=>0, :id=>"sample_sample"), {:controller=>"thesaurus", :action=>"list"}, { :popup=>[''thesaurus'', ''height=800,width=400,location=no,scrollbars=yes'']}) %> </td> </tr> and then this in the popup function copyData(id,value){ var el = window.opener.document.getElementById(id); if (!el.value) el.value = value; else el.value = el.value + "; " + value; this.close(); } I want to send the id of the new object to the popup so that I can refind the text box to assign the selections. How can I do that? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.