This code below will display "Search Friends" in the text box IF
{:select => 'friend'} is not there and the ajax call also does not
work. Any ideas how to get the text and to disaply and have the ajax
call work?
<%= text_field_with_auto_complete :friend, :name,{:select =>
'friend'}, :value => "Search Friends", :onfocus => "if (this.value ==
'Search Friends') {this.value = '';}",:onblur => "if (this.value ==
'') {this.value = 'Search Friends';}",
:after_update_element =>
"function(element,value){" +
remote_function(:url => { :controller => 'followerranking', :action
=> :ajax_add_friend },
:with => "'friend[name]=' +
element.value") + "}" %>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---