Good day, I would like to ask on how to solve the problem regarding RJS on a javascritpt disabled browsers. because when i disable the javascript on my firefox and click on the submit button what i get is the javascript. Is there a way that if javascript is disabled the user will be redirected to the erb file? Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Good day, I would like to ask on how to solve the problem regarding RJS on a javascritpt disabled browsers. because when i disable the javascript on my firefox and click on the submit button what i get is the javascript. Is there a way that if javascript is disabled the user will be redirected to the erb file? Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 8.7.2008, at 11.24, skilled_dreamer wrote:> > Good day, > > I would like to ask on how to solve the problem regarding RJS on a > javascritpt disabled browsers. because when i disable the javascript > on my firefox and click on the submit button what i get is the > javascript. > > Is there a way that if javascript is disabled the user will be > redirected to the erb file?I don''t think you should get the RJS in return if the request is sent from a non-JS context, given that you have an existing normal html template for that action. If you get the RJS back, the action either for some reason thinks that you want to get javascript back or doesn''t have anything else to return. //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
This list is being phased out, you should move your JS questions to the new list here: http://groups.google.com/group/prototype-scriptaculous To your question, this isn''t really a JavaScript related question as it deals with the server responding to different content types. You should look into RESTful style coding practices, wikipedia: http://en.wikipedia.org/wiki/Representational_State_Transfer But basically, in Rails, it is dealing with different content types within a single action, such as: def show respond_to do |wants| wants.html do # HTML response goes here end wants.js do render :update do |page| page.alert "hello from javascript" end end end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 8.7.2008, at 18.14, Justin Perkins wrote:> But basically, in Rails, it is dealing with different content types > within a single action, such as: > > def show > ... > endAlthough, in Rails 2.1, the correct template type is rendered automatically, so you don''t necessary need to use respond_to anymore, unless need some more complex logic in the controller action. //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi