ujs Questions
3
Solved
I have a very simple link on my page. <a href="#">My link</a>. It causes a page refresh. when I remove "turbolinks", it no longer causes a refresh.
I've used links with hash fragments ...
Lavinia asked 11/12, 2013 at 4:13
2
I am using Rails jquery ujs for handling ajax within my app. Also I am using a the confirm option for destroying any records.
As my current setup, I have hooked up a loading overlay screen on click...
Hypochromia asked 22/10, 2013 at 11:31
3
Solved
In my Rails 5.1 app using Turbolinks, I have added a data-disable-with attribute to my submit buttons, so that on click, the button will be disabled, to prevent accidentally submitting the data mul...
Arango asked 19/10, 2017 at 13:49
1
I'm using UJS to handle a form submit with ajax. The form has a file input in it. I'm getting an invalid authenticity token error from the controller that receives it. Am I forgetting some attribut...
Yowl asked 10/7, 2014 at 5:57
4
Solved
I have a Rails Devise form that has javascript validation. When the user presses submit, the validation works and the user is refocused on the form where they need to be.
However, rails uses the ...
Gokey asked 3/2, 2017 at 3:10
3
I am trying to append new items to a container via ajax request on Rails (jsfiddle with explanation is provided below)
my js response I wrote is
var $newthumbs = "..new items..";
$('#homepage_thu...
Kayceekaye asked 23/12, 2012 at 12:39
1
<%= f.button :button, 'Move', class: "btn btn-warning", data: { disable_with: "<i class='fa fa-spinner fa-spin'></i> Moving…"} %>
This works fine in Chrome but fails in Safari. ...
Appleby asked 1/3, 2016 at 21:9
2
Solved
I am using Rails 3.2, I have a form and I want it to be posted via ajax and have the controller return json.
I am using a form_for helper like so:
= form_for(@object, :remote => true, :format...
Pane asked 6/3, 2012 at 12:5
3
I'm using Rails UJS. I have a form setup to do a remote submit like so:
<form accept-charset="UTF-8" action="/subscriptions" class="new_subscription form-horizontal" id="new_subscription" data-...
Carmencita asked 2/10, 2012 at 1:51
4
I have a form that can be used both remotely and normally.
= form_for @comment, html: { class: 'comment-form' }, remote: request.xhr? do |f|
= f.text_area :body
= f.submit
I want the form to s...
Dollfuss asked 28/8, 2013 at 14:11
1
Solved
Since many days I tried to understand why a simple link like this one :
link_to 'My Link', my_path(format: :js), remote: true
was always returning full HTML document instead of executing javascr...
Commotion asked 5/3, 2016 at 11:37
1
I have been wrestling with Rails 4 and UJS and noticed that Rails 4.1 doesn't behave (specifically, rails-ujs) the way I would expect.
When using a remote link with a confirmation dialog, the UJS...
Rhenium asked 16/8, 2014 at 3:1
11
I have a weird problem where JQuery is creating two AJAX requests for a link_to method. I am developing a Rails 3 app with JQuery for UJS. I have a toggle link which toggles between 'Follow' and 'U...
Guttural asked 20/11, 2010 at 8:40
3
Solved
I'm very new to Rails, and as such am having lots of of confusion when dealing with AJAX, UJS and Rails together. I've looked at railscast, several SO answers, tried #rubyonrails IRC channel on fre...
Titan asked 6/6, 2014 at 3:38
5
Solved
Goal
I have a page with a list of items, coming from a Rails backend. I want to be able to edit a row in that list, using Ajax calls via Rails UJS.
Approach
I've added an edit button to the end ...
Srini asked 17/5, 2013 at 16:33
5
Solved
I have a form_tag(foo_path(@foo), remote: true, id: 'foo-form' form and a submit button submit_tag ("Submit", :id => "foo-submit")
I'd like to disable the submit button after it has been click...
Needlecraft asked 16/2, 2014 at 14:6
2
Solved
Using Rails 3.1 jquery_ujs, I have a link with :remote => true, and the controller new action responds with js and render new.js.erb which contains:
$('#post-form').html('<%= escape_javascript(...
Doubleness asked 30/9, 2011 at 21:6
4
Solved
I have a link that when i click on it will trigger an ajax call then replace this link by another link, says for example the original link is "add friend", when i click this link it will send an aj...
Sculpin asked 15/10, 2013 at 15:8
3
Solved
in one project of mine, the code:
= link_to "add", new_me_category_path, class: "btn btn-success", remote: true
can load remote form correctly.
But some one can not work, browser did not exec...
Botticelli asked 23/2, 2013 at 14:19
4
I have a simple form that is being appended to a container:
<form action="/something" data-remote="true" method="post">
<input type="submit" />
</form>
My understanding was th...
Christoper asked 17/5, 2013 at 16:10
3
I'm trying to add some Ajax functionality in my Rails 3 app.
Specifically, I want a button that will submit an Ajax request to call a remote function in my controller, which subsequently queries a...
Holophytic asked 25/4, 2011 at 2:1
4
Solved
I have a section of a site with multiple categories of Widget. There is a menu with each category name. For anybody with Javascript enabled, clicking a category reveals the content of the category ...
Blip asked 24/2, 2013 at 11:58
2
The problem is that i have a remote form that, based on condition, id like to convert to a non-remote form (using UJS), and then submit.
note the form has a file upload.
Here's the details: I hav...
Inwrought asked 28/3, 2012 at 12:9
3
I have a simple form:
= form_for(posts_path, :id => "new_post", :remote => true) do
= text_field_tag "post[input]"
= submit_tag "Post!"
I have bound a callback to the ajax:success event:...
Edmon asked 29/8, 2011 at 2:47
1
Solved
I've run into a very strange issue that I'm having a tough time fixing. In my view, I have a link with data-remote="true" and data-method="delete". When I click the link, I can see a DELETE request...
Sato asked 30/3, 2012 at 1:47
1 Next >
© 2022 - 2024 — McMap. All rights reserved.