similar to: respond_to not detecting JS turned on. form_to_remote problem?

Displaying 20 results from an estimated 9000 matches similar to: "respond_to not detecting JS turned on. form_to_remote problem?"

2006 Jul 26
7
syntax for specifying :html fallback on form_remote_tag
Has anyone gotten the :html option for specifying a ''fallback'' action if javascript''s not enabled working on form_remote_tag (or remote_form_for)? I can''t figure out how to specify the action that''s supposed to be invoked if js _is_ enabled. Or maybe I''m just misunderstanding how this thing is supposed to work. I was assuming
2006 Jun 24
5
request.xhr? vs. respond_to
Searched around this forum, but didn''t find an answer for this question. Can you help this newbie understand any overlap and/or difference between request.xhr? and respond_to? If request.xhr? is true, should I expect it wants.js below? respond_to do |wants| wants.html { redirect_to(person_list_url) } wants.js wants.xml { render :xml => @person.to_xml(:include
2007 Apr 26
2
assert_select with respond_to JS or xhr?
Hi everyone, I am a bit confused with xhr? and respond_to. I have the folloing code in my view to update the ''emails'' ID link_to_remote(image_tag("refresh"), :update => "emails", :url => { :action => "list_emails" }) in the controller side i have somthing like : [..] respond_to do |type| type.html { render :action
2006 Nov 23
2
Some tips for testing respond_to block and making controller tests work with simply_helpful
Hi, Here''s two blog posts for those that need to test respond_to blocks and/or are currently using simply_helpful extensively. http://blog.methodmissing.com/2006/11/22/testing-different-content- types-with-rspec http://blog.methodmissing.com/2006/11/23/using-simply_helpful-with- rspec-controller-tests - Lourens
2007 Jan 18
4
problems testing a rails controller
I''m trying to test a rails controller, but my mock isn''t working. Everything looks right to me. Can someone take a look at it and see if I''m missing something obvious http://pastie.caboo.se/33883 Domain.should_receive(:find_domain).once.and_return(domain) That line in the spec is failing but I don''t see why. If I comment out that line the test passes so it is
2009 Aug 16
5
any help with captcha in my comments ?
this is my error: Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17 00:57:56) [POST] Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"}, "commit"=>"Add Comment", "post_id"=>"19",
2009 Apr 03
7
RJS not rendering correctly when mime-type is 'iphone'
I have an iPhone version of my site, and for some reason none of the rjs works when viewing the iPhone version. This happens instead: ActionView::MissingTemplate (Missing template controller_name/ update.erb in view path app/views) The rjs works fine when viewing the site normally, and it worked when viewing the iPhone version prior to upgrading Rails to 2.3.2. Additional info: I have
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi I had ajax commenting on my app, which worked perfectly on Rails v1.2.6, but does not work the same in Rails 2.02. Basically the comment gets added, but the visual effects do not work (ie lines 2 + 3 of create.rjs) create.js page.insert_html :bottom, ''comments'', :partial => ''comment'' page.visual_effect :appear, "comment_#{@comment.id}"
2010 Aug 21
1
Rendering a different Javascript file in respond_to
Hi everyone, I am stuck in an (apparently) simple problem. In my event_controller I have the i_like_it action: def i_like_it @event = Event.find(params[:id]) ... # logic respond_to do |format| format.js end end In my case "i_like_it" is called with :method => PUT (it is an Ajax call, "i_like_it.js.erb" will be returned as a script and it wil be
2008 Apr 07
5
trying to use Ajax.InPlaceEditor
Hi, I''m programming a Ruby on Rails project where I am on the edit page of /boxes/1/edit and I''m trying to make an InPlaceEditor for the color property. (E.g. red box, blue box, etc.) My problem is that after successfully saving the value in the database, the response I get from the server is javascript, and it''s being rendered in the place where the updated value is
2008 Sep 10
5
xmlhttprequest for updating
Hello, I am updating an object with an AJAX form: view: <% remote_form_for(@sample, :update => "content2") do %> <p> parameter: <br /> <%= select("sample","parameter",Parameter.find(:all).collect {|p| [p.description.gsub(''_'', '' ''),p.id]},{},{:size => 4, :multiple => true}) %>
2006 Apr 08
2
respond_to causes DoubleRenderError?
I have a custom authentication plugin that redirects users to a login site if they aren''t already authenticated and their session hasn''t timed out. I had things working fine with straight http requests, but wanted to add support for ajax requests. I thought this would be a simple matter of replacing all of my "redirect_to <blah> and return false" calls with
2006 May 03
3
Graceful degrading AJAX show/hide
Ok i''ve done a bit of hunting around and I can''t find much documentation on how ensure an ajax call through an rjs file degrades with javascript off. Essentially, if javascript is off, I want to refresh the page and pass a variable from the controller to the page the user is on. Not use the rjs file. At the moment i have this: <%= link_to_remote("Advanced Search",
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi, Problem Summary: I have been trying to add the highlight effect to my table but everytime a new record is added the highlighting gives an rjs error. However when i click the add to cart button on a product that already exists inside the table, the highlight effect works. Is this because the partial must only have only one <tr></tr> in it and the <table> must be on the other
2006 Jul 14
9
DRY Javascript Degredation
Hi, It seems there must be a better way to do this than what I am currently doing. I have a simple app that collects a users thoughts along with their email address and their first an last name. On a page that lists all the users thoughts they can click on a link to "add a thought" which then displays a form with ajax. My current methodology for this is not very dry. If js is
2012 Feb 20
1
respond_to format.json not being called
Hi all, I''m submitting a form using jQuery, but in the respond_to block only the format.html action is called. This is the javascrip: send_button.on(''click'', function(){ var form = $(this).closest(''.modal'').find(''form''); $.post(''/messages'', form.serialize(), function(data, status, xhr){
2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using form_remote_tag, which calls a controller action which adds a comment and then sends back some JS via RJS which updates a few items on the page. It did work fine but (and I''ve no idea what has happened) now it doesn''t. It calls the controller action but gets an empty response back and
2011 Aug 13
3
How to make an AJAX call to different domains in Ruby on Rails 3.0
I have an action email in my controller of application running on www.example.com and I am trying to send the form data of email to www.data.example.com/email where my another application receives the request and I am able to save the data in js format. But I want to send back the acknowledgement to www.example.com and replace the html using rjs template. Here are some code for you reference: