Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
In the View
<div id="ajaxResult"></div>
<h5>Add</h5>
<%= form_remote_tag :url => { :action => :add_field }, :update => "ajaxResult" %>
<%= text_field :myModel, :name %> <%= submit_tag %>
<%= end_form_tag %>
When you push the submit Akelos call the method "add_field" in the controller.
add_field looks like
function add_field() {
$this->fromAjax = $this->params['topic_field'];
$this->renderPartial("ajaxPartial.tpl");
}
the file "_ajaxPartial.tpl" looks like
This from Ajax <b>{fromAjax?}</b>
Remember
<%= javascript_include_tag 'prototype' %>
in the layout
-- Simone
1 to 2 of 2