Hi,

What will completion_options[:skip_style] be?

I have implemented it like
<input type="text" id="criteria[<%=count%>][data_autocomplete]" 
name="criteria[<%=count%>][data_autocomplete]" size="60" 
autocomplete="off"/>
<%=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
>> <input type="text" id="criteria[<%=count%>][data_autocomplete]"
>> 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/.