# Returning search result to new.html.erb as textfield value

**URL:** <https://www.ruby-forum.com/t/returning-search-result-to-new-html-erb-as-textfield-value/181622>\
**Category:** Rails\
**Created:** [January 14, 2010, 9:01pm UTC](https://www.ruby-forum.com/t/returning-search-result-to-new-html-erb-as-textfield-value/181622 "2010-01-14T21:01:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [January 14, 2010, 9:01pm UTC](https://www.ruby-forum.com/t/returning-search-result-to-new-html-erb-as-textfield-value/181622/1 "2010-01-14T21:01:13Z")

</div>

Hello all,

I have a link on my “new.html.erb” for new projects called "Add IRB(s).  
When clicked, this will produce a jquery ui dialog box rendering a  
search form with button.  
when I click the search button with a search string, the dialog box  
expands to the bottom with search results. Like below…

IRB Search Results  
IRB ID Title PI Full Name Action  
00-010 Project Title … John M. Add IRB

The “Add IRB” is a hyperlink to return the IRB ID to the “new.html.erb”  
as a filled text field. I will add a little CSS to remove the border.  
Like so…

Associated IRB(s) “Add IRB” \<- hyperlink 00-010 (remove)

I can use "\<%= link\_to\_function “remove”, “$(this).up(’.irb’).remove()”  
%\> " to add the “(remove)” link and remove the number.

I’m just not sure as to how to send the result to the “new.html.erb”.

Thank you for any help.

JohnM
