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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Oct 11, 2010 at 4:26 PM, Zack Nathan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello everyone, > > for some reason my ajax form isnt working. I have NO idea why not!I am not an expert at rjs as I prefer to go directly with jquery, but when you say not working, have you tried in firbug to see if a request is being sent at all? Is anything executing?> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David Kahn wrote in post #949268:> On Mon, Oct 11, 2010 at 4:26 PM, Zack Nathan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: > >> Hello everyone, >> >> for some reason my ajax form isnt working. I have NO idea why not! > > > I am not an expert at rjs as I prefer to go directly with jquery, but > when > you say not working, have you tried in firbug to see if a request is > being > sent at all? Is anything executing?Nope. I''ll give that a go now. But i tried adding puts "hello" in the action and it never prints hello on the server so Im not sure why thats the case either. Thanks. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It doesnt seem to be posting anything.. :s -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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)) render :update do |page| page.replace_html "results", :partial => "path_to_view" page[:results].visual_effect :highlight, :startcolor => "#bbcccc", :endcolor => "#ccdddd" end end On Oct 11, 5:26 pm, Zack Nathan <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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 viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Phillip wrote in post #949370:> 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)) > > render :update do |page| > page.replace_html "results", :partial => "path_to_view" > page[:results].visual_effect :highlight, > :startcolor => "#bbcccc", > :endcolor => "#ccdddd" > end > endThanks for the reply, but stil nothing.. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 October 2010 01:34, Zack Nathan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> It doesnt seem to be posting anything.. :sAre you seeing the post in the log? If not then it is the submit that is failing. Have a look at the html for the form and see if you can see anything wrong (View, Page Source or similar in the browser). Also copy the html and paste it into the w3c html validator to check the html is valid. Colin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Well then the submit must be failing because nothing appears in the log. This is very odd :S. 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Are you using rails 3? The helpers with remote dont work the same way 2010/10/12, Zack Nathan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Well then the submit must be failing because nothing appears in the log. > This is very odd :S. > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Enviado desde mi dispositivo móvil -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
nope im using version 2.3.8 . -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.