From: Neha Chopra Date: 2007-12-11T02:29:21+09:00 Subject: Re: Auto Complete using tex input Hi, What will completion_options[:skip_style] be? I have implemented it like <%=content_tag("div", "", :id =>"#{@data_elem.id}_auto_complete", :class => "auto_complete") %> <%=auto_complete_field @data_elem.id%> and i am getting missing variable name an error in prototype.js. Xavier Noria wrote: > On Dec 7, 2007, at 9:25 PM, Neha Chopra wrote: > >> But i cant use the tag directly. >> I want to use it this way >> > name="criteria[<%=count%>][data_autocomplete]" size="60" >> autocomplete="on"/> >> >> and i dont know what javascript to pass so that observer gets fired >> and >> all. > > This is a starting point, where each component is more or less self- > explanatory: > > return <<-HTML > #{auto_complete_stylesheet unless > completion_options[:skip_style]} > #{text_field_tag tf_name, tf_value, tag_options} > #{content_tag("div", "", :id => > "#{tf_id}_auto_complete", :class => "auto_complete")} > #{auto_complete_field tf_id, completion_options} > HTML > > You create custom HTML elements, and after that delegate in > auto_complete_field. > > -- fxn -- Posted via http://www.ruby-forum.com/.