[b]1,jQueryAutoComplete[/b]
[url]http://rorplugin.googlecode.com/svn/trunk/jquery_auto_complete/[/url]
jQueryAutoComplete is a jQuery-based Ruby on Rails AutoComplete plugin.
jQueryAutoComplete lets you push a JavaScript Array to the front page for auto-completion to use.
jQueryAutoComplete's style is easy to modify, please refer to public/stylesheets/jquery.autocomplete.css
============
Usage:
[code]
======================
books_controller.rb:
--------
def books_for_lookup
@books = Book.find(:all)
@headers['content-type'] = 'text/javascript'
render :layout => false
end
======================
books_for_lookup.rhtml:
--------
var books = [];
<% @books.each do |book|%>
books.push("<%= book.name %>");
<% end %>
======================
books.rhtml:
--------
<head>
<%= auto_complete_include "/books_for_lookup" %>
</head>
======================
search.rhtml:
--------
<div id="content">
<p>
<label>Books:</label>
<input type="text" id="suggest1" />
</p>
</div>
<%= auto_complete("suggest1", "books") %>
------------------
[/code]
[b]2,PrototypeAutoComplete[/b]
[url]http://rorplugin.googlecode.com/svn/trunk/prototype_auto_complete/[/url]
PrototypeAutoComplete is a Prototype-based Ruby on Rails AutoComplete plugin.
PrototypeAutoComplete lets you push a JavaScript Array to the front page for auto-completion to use.
PrototypeAutoComplete's style is easy to modify, please refer to public/stylesheets/prototype.autocomplete.css
============
Usage:
[code]
======================
books_controller.rb:
--------
def books_for_lookup
@books = Book.find(:all)
@headers['content-type'] = 'text/javascript'
render :layout => false
end
======================
books_for_lookup.rhtml:
--------
var books = [];
<% @books.each do |book|%>
books.push("<%= book.name %>");
<% end %>
======================
books.rhtml:
--------
<head>
<%= auto_complete_include "/books_for_lookup" %>
</head>
======================
search.rhtml:
--------
<div id="content">
<p>
<label>Books:</label>
<input type="text" id="suggest1" />
</p>
</div>
<%= auto_complete("suggest1", "books") %>
------------------
[/code]
Screenshot:
[img]http://rorplugin.googlecode.com/files/screenshot.jpg[/img]
[url]http://rorplugin.googlecode.com/svn/trunk/jquery_auto_complete/[/url]
jQueryAutoComplete is a jQuery-based Ruby on Rails AutoComplete plugin.
jQueryAutoComplete lets you push a JavaScript Array to the front page for auto-completion to use.
jQueryAutoComplete's style is easy to modify, please refer to public/stylesheets/jquery.autocomplete.css
============
Usage:
[code]
======================
books_controller.rb:
--------
def books_for_lookup
@books = Book.find(:all)
@headers['content-type'] = 'text/javascript'
render :layout => false
end
======================
books_for_lookup.rhtml:
--------
var books = [];
<% @books.each do |book|%>
books.push("<%= book.name %>");
<% end %>
======================
books.rhtml:
--------
<head>
<%= auto_complete_include "/books_for_lookup" %>
</head>
======================
search.rhtml:
--------
<div id="content">
<p>
<label>Books:</label>
<input type="text" id="suggest1" />
</p>
</div>
<%= auto_complete("suggest1", "books") %>
------------------
[/code]
[b]2,PrototypeAutoComplete[/b]
[url]http://rorplugin.googlecode.com/svn/trunk/prototype_auto_complete/[/url]
PrototypeAutoComplete is a Prototype-based Ruby on Rails AutoComplete plugin.
PrototypeAutoComplete lets you push a JavaScript Array to the front page for auto-completion to use.
PrototypeAutoComplete's style is easy to modify, please refer to public/stylesheets/prototype.autocomplete.css
============
Usage:
[code]
======================
books_controller.rb:
--------
def books_for_lookup
@books = Book.find(:all)
@headers['content-type'] = 'text/javascript'
render :layout => false
end
======================
books_for_lookup.rhtml:
--------
var books = [];
<% @books.each do |book|%>
books.push("<%= book.name %>");
<% end %>
======================
books.rhtml:
--------
<head>
<%= auto_complete_include "/books_for_lookup" %>
</head>
======================
search.rhtml:
--------
<div id="content">
<p>
<label>Books:</label>
<input type="text" id="suggest1" />
</p>
</div>
<%= auto_complete("suggest1", "books") %>
------------------
[/code]
Screenshot:
[img]http://rorplugin.googlecode.com/files/screenshot.jpg[/img]