Displaying 20 results from an estimated 11000 matches similar to: "Rails 3: link_to :remote => true with spinner"
2012 Mar 07
1
link_to with :remote=>true works when bound to "click" but not "ajax:beforeSend"
Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am
loading jquery.js and jquery_ujs.js. In my document ready, if I bind
to the event "click," clicking the link fires an event, but if I click
to ajax:beforeSend, it doesn''t. Nothing happens when you click the
link in JQuery. The event does go to the controller, though.
Works:
$(document).ready(function(){
2011 Apr 28
0
link_to with :remote=>true and how about :before=> ?
Hey Guys,
Before Rails 3.0 I was to be able invoke some javascript before and
after an ajax call was made, like this:
link_to_remote "aLabel", url, :before=>$(''indicator'').show(),
:complete=>$(''indicator'').hide()
In Rails 3.0, I understand I need to use link_to and pass the parameter
:remote=>true. link_to however, doesn''t accept
2012 Feb 29
4
how to use link_to with :remote=>true in rails 3.2.1
I m using Rails 3.2.1. how to use link_to with remote=>true
--------------------------------------------
My Method in Controller
def clickme
@clk = "you click me"
respond_to do |format|
format.js { render :layout=>false }
end
end
--------------------------------------------
My View
In my new.html.erb file
<%= link_to "click here",
2008 Sep 25
2
jquery, format.js and IE
I''m trying to use jQuery to write all my js unobtrusively, and running
into a bit of a problem when triggering the format.js block in IE6 (and
possibly IE7). It returns the JSON string no problem, but instead of
parsing it, IE6 asks to download the resource as a .js file.
So if my url is ''/pictures/1.js'', IE6 will ask to save or run ''1.js''
I did do
2010 Nov 06
0
Rails and JQuery and Ajax/Json question
Hi,
I am using JQuery in my rails app. I''ve taken the approach outlined
in Ryan Bates''s Railscast on jquery to do the following:
jQuery.ajaxSetup({
''beforeSend'' : function(xhr) {xhr.setRequestHeader("Accept",
"text/javascript")}
});
to set my ajax call request Headers to text/javascript so that my
respond to block for javascript is
2011 Aug 13
0
Rails 3.1 , jQuery, link_to to a partial without reloading page
In the index page i want to place a link (for registered users only)
that show''s the User.all in a partial on a div without reloading the
whole page.
But since i don''t know jquery... is there a code or a tutorial online?
I read that before it was possible with remote=> true but since rails
3.1 switched to jquery and added the assets directory i have no idea
how to do it.
--
2013 Jan 16
0
Rails 3.2 jQuery JSONP request not working - Moved Permanently
I am trying to send a POST request ( ''remove_tag_named'' )and getting a
simple OK back on success ; it doesn''t work..
the post is correctly sent , but after then it''s looping on sending a GET
request to the same url, with the error
301 Moved Permanently
I should not be far fro the solution, but I am stuck :
In my routes.rb
*namespace
2008 Mar 10
1
spinner in form tag?
Hello!
Is it possible to have a spinner in form_tag?
like:
<% form_tag :action=> ''list'', do
:loading=>"Element.show(''spinner'');",
:complete=>"Element.hide(''spinner'');" %>
...
...
<% end %>
If not how could I do it?
Thank you!
--~--~---------~--~----~------------~-------~--~----~
You
2012 Feb 21
1
link_to 'Frob', '/thang/frob', :remote => true
Railsters:
I have finally gotten back to Rails, and I''m having the usual "a
little bit too flexible for your own good" problems.
Specifically, the above in my Haml renders this:
<a href="/thang/frob" data-remote="true">Frob</a>
I need href=''#'' and an Ajax call.
What did I do wrong? (Besides, ahem, attempt to read the fine
2011 Aug 16
0
question regarding link_to vs link_to_remote
Hi,
I''m hoping someone can answer my question. With the Rails 2
link_to_remote tag, I could have two separate links, pointing to the
same controller/action, updating two different destinations(divs).
But now that the javascript has been extracted to a .js.erb file
associated with the controller/action, how can I pass it a destination
div? Should I pass the destination div as a URL
2010 Jun 02
1
Ajax with JQuery
I have used Ajax link and live validation in index.rhtml
Ajax link requires JavaScript "prototype" and live validation requires
"jquery".
i got "element.dispatchEvent is not a function" on the firebug console
when i used "prototype" and "jquery" in same page index.rhtml
after i removed javascript "prototype" library, i got "Ajax is
2006 May 30
2
Strange error
I have been getting the following error everyonce in a while. Can
someone please suggest what could be going wrong with my system? It
happens about once every 3 weeks. I resolve this by rebooting my server,
although I never tried to figure out what is the real problem.
Sharkie
2006-05-30 16:53:49: (mod_fastcgi.c.1561) connect failed: 386 Connection
refused 111 0 /tmp/site.fcgi.socket-2
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
Hello all,
I am trying to implement a POC wherein I can post a message + image and
get the same working via AJAX to display them both for each new entry
without the page reloading.
I am using a config of Ruby 1.8.7 and Rails 2.0.2 for project specific
purposes.. I am also using a pretty old paperclip commit from github for
this....I had to suit my proj config requirements mentioned previously..
2005 Dec 24
2
Where can I get a royalty-free/open-source spinner image?
Hi everyone,
Where can I get a royalty-free copy of the spinner.gif or some other
AJAX activity icon? I don''t want to swipe one without asking.
Thanks,
Jason
2007 Feb 27
1
link_to :post true Newbie question
Hi All,
I am attempting to use a link_to helper to perform a form post using the
following construct:
<%= link_to ''Save'', {:action =>''create''}, :post => true %>
What I find is the parameters passed to the webserver are empty. My
model validation stuff triggers indicating the fields in question are
empty too. This is to create a new DB entry so no
2013 Sep 19
0
CRUD model in a bootstrap modal with jquery, ajax - best practice
Hi,
i have an model, which i want to show edit and update in a dialog via ajax.
What i do at the moment:
To open the Modal and render the partial, i send an ajax request to
controller#show with ujs
this is the link:
<a class="person-dialog" data-remote="true" data-type="script"
href="/en/people/32" onclick="return false">Fidel
2005 Dec 06
0
SwitchTower with spinner/spawner/reaper = teh suxx0r
hey all,
So, we''ve been trying to get a nice stable config running for
deployment with SwitchTower, spinner spawner and reaper, and I have
to say, they are, as it says in the title, teh suxx0r.
<warning>I''m annoyed, and wrote this while annoyed</warning> ;)
The problems are rife:
1. Because lighttpd has no control over the fcgis, the restart
process is
2006 Oct 06
0
link_to with :post => true causes "link hop" on submit
I have a link_to function that I''m calling with :post => true. When I
click it, the link (which is in a table cell) moves up a bit and pushes
the next table row down just a bit, like it''s hopping.
My guess is that in the generated Javascript (by link_to), the addition
of the form to the DOM is causing the link itself to move.
Anyone seen this before, and if so, know a
2013 Feb 12
2
Rails parameters get lost because of jQuery link
(Original
post: http://stackoverflow.com/questions/14569721/rails-parameters-get-lost-because-of-jquery-link,
unfortunately no response)
I saw this Railscast (
http://railscasts.com/episodes/240-search-sort-paginate-with-ajax) the
other day and wanted to use the techniques for an application of mine. I
have a page with elements on it and I want to sort them by values and
select them by tags.
2006 Apr 30
1
link_to_remote possible with :class AND progress indicators?
I have the following code:
<code>
<span id="loader" style="display:none;">
<%= image_tag "spinner.gif" %></span>
<strong><%= link_to_remote(''Add Entry'', {:update => ''add-entry'',
:url => { :action => "show_add_entry" }},
:loading =>