Hello everyone,
for some reason my ajax form isnt working. I have NO idea why not! My
ajax form is in my index view. Here is my code.
My index view is this:
<h1>Charts</h1>
<div id="dividing_box">
<% form_remote_tag :url => {:action => 'view'}, :update => 'results'
do %>
Between:
<%= date_select :date_1, :order => [ :day, :month, :year ],
:start_year => 2010, :end_year => Time.now.year %> and
<%= date_select :date_2, :order => [ :day, :month, :year ],
:start_year => 2010,:end_year => Time.now.year %><br/>
Type <%= select( "charts", "type", { "Calories burned" =>
"calories_burned", "Distance" => "distance", "Heart rate" =>
"heart_rate"}) %><br/>
<%= submit_tag 'View' %>
<% end %>
<div id="results">
</div>
</div>
My action called view view's is this:
<%= @graph %>
my view action is:
def view
date_1 = params[:date_1]
date_2 = params[:date_2]
type = params[:type]
@graph = open_flash_chart_object(758,400, show(date_1, date_2,
type))
end
Thanks,
zack.
--
Posted via http://www.ruby-forum.com/.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.