Displaying 20 results from an estimated 20000 matches similar to: "link_to with :remote=>true and how about :before=> ?"
2010 Jul 06
0
Rails 3: link_to :remote => true with spinner
How is this most efficiently done? link_to_remote is gone.
I am using jQuery and am wondering how I could bind beforeSend call back
with my link_to :remote => true call. So that I can use it to draw
spinner.
Sharkie
--
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
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",
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think
should be a simple effect, but have not had any luck yet and apparently
I am not following the general idea...
What I am trying to accomplish is the following (part 1 works and part 2
does not):
1. One of my views has a link_to_remote which updates a div container
with a table of data
my example is
<div
2006 Jun 04
3
Ajax table does not update
I have two models: Child and Day. A Child has many days, and a day
belongs to a child.
I want to create ana ajax table listing the children and, after pressing
a button, I want to show the days that belong to that child.
Here is my code:
(list.rhtml)
<table>
<tr>
...
<td><%= link_to ''Days'', :action => ''show_days'', :id =>
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
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
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
2006 Aug 02
0
"RJS Error: TypeError: $(element) has no properties"
i have lots of divs, which are added via link_to_remote. now i want to
delete them with a link_to_remote button for each. i am giving them ids
with the same name and a serialized number. when trying to access them
with javascript/rjs, strange things happen: "RJS Error: TypeError:
$(element) has no properties?. is this a rails, rjs or prototype bug? or
am i missing something?
see my code
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click
on my link_to_remote, the rjs executes, returns the correct javascript to
the browser, but it doesn''t update the div I''ve specified. What appears to
be coming back from the controller is:
Element.update("my_form", "hello, rjs");
I''m tearing my hair out.
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
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(){
2006 Feb 08
3
RJS templates before, during and after
RJS templates are nifty. They let you put all sorts of fun effects all
over your bland html pages without too much work.
The link_to_remote function also lets you run scripts before, during,
and after an AJAX call is run by using callbacks.
There does not seem to be an equivalent method for running an RJS
template before or during an action. Rendering it at the end is no problem.
One
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
2006 Apr 28
4
can someone help DRY a noob? thanks...
hi all
i''m trying to pass a variable name right round the block and need a hand
to ease my aching brain.
##in my sidebar i have
<li><%= SidebarItem(''catalogue'') %></li>
<li><%= SidebarItem(''provenance'') %></li>
<li><%= SidebarItem(''status'') %></li>
##linked to a
2008 Jul 24
1
How to add link_to_remote element with RJS?
Hello,
after executing an action, I add an <li> element to an existing list
using a RJS template:
page.insert_html :bottom, :contributors, "<li
id=''contributor.#{@contributor.id}''>#{@contributor.user.name}</li>"
but I need to add an image with a link_to_remote as I have in a
partial page:
<li id="contributor.<%= contributor.id
2006 Feb 18
2
Extending the onclick properties with link_to ?
I''m currently using a link_to function to generate an Ajax call. I''d
like to be able to introduce other operations that occur upon click but
I''m not aware of a way to add to link_to''s funtionality.
I have a div which is hidden and would like to set it to be visible
before (or after) the Ajax call.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my
form page. Here''s my page:
<div id="posts">
<ul id="post_list"><%= render :partial => ''list_results'', :collection =>
@posts %></ul>
<p><%= link_to_remote(''+'',
:url => {:action =>
2010 Jul 13
1
will_paginate destroys link_to_remote?!
Hello,
I''ve got a list in a view and each of element of it has a link_to_remote
and everything worked like a charm. Now I added AJAX pagination and the
link_to_remote doesn''t work anymore.
This is the partial of the list:
<% for character in characters %>
<%= character.name %>
<%= link_to_remote t(''.add''), :url =>
2008 Jul 17
2
Problem with link_to_remote, RJS and jRails
Hi, everyone,
I''m trying to update the content of a div using link_to_remote and RJS
template.
Everything works fine if I use the default Prototype/Scriptaculous
libraries, but I want to use jRails ''coz other parts of my application
use a lot of jQuery.
Here are the steps I done:
1. inside StatesController.rb I defined the following action:
def update_view
# do nothing just
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both
Element.update and page.replace_html in an rjs. I can put a
link_to_remote in the partial using an :update, and the div updates
fine. Does anyone have any idea why this might be happening?
In the partial:
<div><div>
.
.
<div id="question_<%=question.id%>_error"></div>
.
(if a