Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
multiple auto_complete_search in same form
  • Loading branch information
kfl62 committed Mar 18, 2009
1 parent 20a70e7 commit d68465c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/forms/application_helper.rb
Expand Up @@ -93,8 +93,8 @@ def td_auto_complete_search(object_name,method, options = {})
end
html = '<td>'
html += "<div id='searching' class='searching' style='display:none'>...?...</div>"
html += tag(:input, :id => 'auto_complete_search', :type => 'text', :value => habtm_value, :size => options[:size])
html += tag(:div, :id => 'auto_complete_search_result', :class => 'auto_complete')
html += tag(:input, :id => "auto_complete_search_#{method}", :type => 'text', :value => habtm_value, :size => options[:size])
html += tag(:div, :id => "auto_complete_search_result_#{method}", :class => 'auto_complete')
html += auto_complete_search(object_name,method, options)
html += '</td>'
if options[:hidden_field_value]
Expand Down Expand Up @@ -202,8 +202,8 @@ def image_tag_for_link(src,options ={})

def auto_complete_search(object_name,method, options = {})
function = "new Ajax.Autocompleter("
function << "'auto_complete_search', "
function << "'auto_complete_search_result', "
function << "'auto_complete_search_#{method}', "
function << "'auto_complete_search_result_#{method}', "
function << "'/trst_sys/auto_complete'"

js_options = {}
Expand Down

0 comments on commit d68465c

Please sign in to comment.