Me wrote: > I have this select in a form: > <%= select('contact', 'id', @contacts, {:prompt => 'Select Contact'} , > { :onchange => remote_function(:url => { :controller => > 'contacts', :action => "ajaxshowcontact", :id => @mop.id}, :with => > "'contactid=' + this.value" ) > } ) %> > > The prompt works in the form but when I do a replace_html on it I get > everything but the prompt.
Post the replace_html code? Next, put only that <%= select %> thing into a partial (yes tiny otherwise useless partials are a Best Practice), then do rjs.replace_html :my_div, :partial => 'my_partial'. (I call "rjs" the variable everyone else calls "page", because the interthing has too many "page" variables all over it!) You could also see about putting the :url into a named route. Just about anything in Rails that's "named" is a best practice, too! --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---