Tagged Questions
0
votes
0answers
19 views
jQuery auto complete solution
I've had a problem with the autocomplete. Please could you help me solve it.
This my controller code:
def new
@product = Srch.new
end
class ProductsController < ApplicationController
...
-1
votes
0answers
29 views
Using jquery for autocomplete
I'm trying to use the auto-complete with jQuery with the help of this.
https://github.com/crowdint/rails3-jquery-autocomplete
But when i use this block
create_table :srch do |t|
...
0
votes
2answers
25 views
Clearing a form field after using append to ajax
I am using an ajax function to append a comment to a a list of existing comments. I have the append to working, but after I append the comment is still in the text field. I am trying to figure out ...
0
votes
0answers
23 views
Adding ajax to create action
At first I'm trying to add ajax to my create action, I was looking at rails guides and some tutorials, they were using jquery_ujs. After all operations nothing has changed, my create action working ...
-2
votes
0answers
8 views
Is there anyway to use bootstrap typeahead from server (Ruby on Rails)?
I am trying to use bootstrap typeahead and ideally want to search the server side for my results rather than picking from a direct JSON with all the possible results being pulled into the front end. I ...
0
votes
2answers
47 views
Rails 4: Javascript onload not firing
No solutions on stackoverflow seem to be working for my issue here, though I am likely missing something basic. I can't seem to get JQuery's .ready function to fire in my Rails 4 application.
I have ...
0
votes
0answers
17 views
rails 3.2.8 JqueryMobile 1.4 Android not loading Icons, but iPhone does
I am not sure where the issue is, but when I go to my site on an Android(EVO), the Jquery Mobile Icons do not load, throwing
ActionController::RoutingError (No route matches [GET] ...
0
votes
1answer
11 views
Rails4 and CoffeeScript: jQuery bindings not working when server returns 304 status code
I am building a new site on Rails 4. I have noticed than when browsing from page to page, Rails (Puma) returns 304, not modified. So far so good. The problem is that when that happens, none of the ...
0
votes
2answers
31 views
jQuery: Cross-domain POST on Rails
I'm trying to make a post request to another domain using the following code
$.ajax({
url: "http://domainName.com/api/v1/statistics/1",
crossDomain: true,
type: 'POST',
dataType: ...
0
votes
0answers
14 views
jQuery tokeninput and rails after_destroy callback
I've been working for hours on an odd problem where jQuery tokeninput is not triggering the after_destroy callback on my rails 4 app. I have the following code:
class Tagging < ActiveRecord::Base
...
0
votes
0answers
33 views
Rails remote: true response
I have a problem I cannot solve... I am building a rails application and I use remote: true in order to "attache" a photo to a certain attachable model. Although the photo is attached as expected and ...
0
votes
1answer
39 views
Rails load part of “each” loop after page load
I have a query executed as part of an each loop which is particularly expensive so I'm wanting to load it after the rest of the page load, ideally with some sort of spinner to indicate activity, but ...
1
vote
1answer
29 views
jquery file uploader for multiple files with multiple progress bar
I have got requirement to upload multiple video's and i need progress bar for each file upload.I'm using paperclip and query file up loader. I don't know where im doing wrong, i could able to upload ...
0
votes
0answers
13 views
Rails: Why a single click doesn't work for an anchor created using Sidr jQuery library?
I'm using this library called Sidr to create sidebars. I have included all the jQuery and CSS needed, infact it's working, BUT I have to double click instead of 1 Click to actually open the side bar.
...
0
votes
1answer
28 views
Rails multi step form with Javascript – browser back button behavior
I have 1 form that I've separated into multiple divs, each with their own Next button.
Upon clicking "Next" some javascript fires (see below) that hides the current div and unhides the next div (i.e. ...
1
vote
2answers
22 views
Rails 4 - Error Handling via Ajax - Error not firing
I am trying to submit a "blank" form to purposely trigger an error.
However, it is still responding with the "Success" function and not flagging an error. But, no records are being added.
The ...
0
votes
3answers
29 views
HTML Input Field: Check if city & state exists
I am creating a registration form and one field requires both a city and state value. For example "Seattle, WA". Now I need a way to verify that the city exists in the state and the state itself ...
0
votes
2answers
31 views
jQuery Autocomplete doesn't work in Rails 4
I'm trying to integrate jQuery UI Autocomplete in my Rails 4.0 application like described in this Railscast: 102-AutoCompleteAssociationRevised.
Unfortunately, the autocompletion doesn't work. I ...
0
votes
1answer
22 views
Troubles using CrossriderAPI with rails 4 turbolinks
I'm having some troubles using CrossriderAPI with turbolinks, my scenario is this:
1. Going on my http://website.local/
2. running a check to see if Crossrider extension is ready:
...
0
votes
1answer
58 views
Use the mouse to select only one word in text jquery
I am working on rails 4 project. I need to select only one word from a paragraph. Right now i am able to select the entire paragraph using the below code: ...
1
vote
2answers
32 views
jQuery if/else condition doesn't work fine in js.erb files
I'm running into problem with jQuery if/else condition here.
I perform a render partial in both the conditions, when I check by placing a debugger both these conditions get executed irrespective of ...
0
votes
0answers
18 views
Doing an ajax post and getting a 200 response with a rollback in rails, ajax not catching it
I'm using Devise and rails, and on a signup form I use an ajax call to post a new user. When I test it with a previously registered email, it succeeds, POSTS with a 200, and then the server rolls it ...
0
votes
2answers
21 views
Nav bar reappears after calling .remove()
When I call the .remove() function with .click, the navbar and button disappear but then reappear a couple seconds later. Although running the remove() function from console removes the nav bar and ...
0
votes
1answer
12 views
alternative to datatables in rails?
I'm looking for a nice alternative to datatables.
All it should do is a simple form where people can enter a string and it should filter all the results and display them to the user.
If you know a ...
0
votes
1answer
23 views
Reload partial view using AJAX not working
I want sort a column without reload the page, I'm trying to use Ajax but it's not working.
welcome_controller.rb
def index
@keyword = params[:keyword]
@category = params[:category]
@search = ...
0
votes
1answer
21 views
How to Detect Changes on New Radio Buttons?
I have code that detects a radio button change and then calls a method on the button. It works fine on existing buttons, but when I add new radio buttons to the page (through ajax), it doesn't work on ...
0
votes
1answer
26 views
Executing jquery statements sequentially
I have a Ruby on Rails app with some jquery to render partials asynchroneously. So first I want to change to active state of the tabs, then clear the tab pages and then load the partial:
...
0
votes
1answer
23 views
JS for render partials, how not to reload the page?
I have a main page with 3 tabs, details, interns and analyst_system.
In interns tab I have a table, the same for the analyst_system table.
I want sortable columns the both table, so I used the gem ...
0
votes
1answer
16 views
Handle File image uploaded from Ajax request in Rails
I am facing a problem with ImageMagic that I don't know how to handle image that uploaded by ajax request. I my client side application i read the content of the file using filereader, readAsDataURL, ...
0
votes
1answer
12 views
Wookmark not changing layout
In my rails 3.2 project, I'm currently using the gem version of wookmark and it seems to be working since I can see the asset being loaded in the development logs.
//= require jquery
//= require ...
0
votes
0answers
26 views
uploading a file via ajax along with the rest of the form data
I have been searching for a solution for two weeks now on this. I have a custom form that i have built that is pretty unique. I need to be able to uplaod the form data along with one or many files ...
0
votes
2answers
28 views
Clickable table row using Rails/jQuery - can't get link within row working correctly
I'm playing around with a Rails 4 project and I was successfully able to make it so clicking anywhere in the table row would link to the show page for an item (using jQuery):
...
0
votes
1answer
27 views
ActionView::Template::Error (Missing partial pins/pin… + will_paginate infinite pagination error
Hi I'm learning Ruby right now in an online course by making a Pinterest clone.
Trying to get infinite scroll to work, and getting errors in the console.
This isn't in the course, so I've been ...
0
votes
0answers
15 views
Jquery mask plugin working sometimes on rails 4
I'm trying to use mask on my form. So:
My application.js file:
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require select2
//= require masks
My masks.js ...
0
votes
0answers
8 views
print dialog method Rails PDFKit
I have no problem rendering html page to PDF and send it to be downloaded, but now my client is asking, instead of downloading it, show a print dialog.
Is there any way to accomplish this either ...
0
votes
0answers
26 views
Fancybox doesn't work when opened on a consecutive page
In my project I have apartments and groups of photos that belong to each of the apartment. On an apartment show page I want to create galleries using fancybox. When I open the show page fancybox ...
0
votes
1answer
37 views
Rails: What is wrong with this logic of trying to render a parial on click?
I'm trying to get the activities when the user clicks on a button called display
Controller:
def display
@activities = Activity.all
@activities = Activity.order("created_at desc")
#we ...
0
votes
3answers
22 views
Using jquery to send a javascript variable to rails variable on submit
So I have this javascript variable I'm generating on my html.erb views that I want to send to a rails variable the form submit. I understand that I can do this using jquery or ajax but my attempts ...
0
votes
0answers
23 views
Select2 is not showing values in drop down
The drop down is not showing the values that I am getting from the ajax call. I think its not calling the formatResult function. I am not sure whats happening. It just shows 'Searching...'. Any clue ...
0
votes
0answers
29 views
Too much CPU Usage for an app in ruby on rails, mongodb and jquery
This is more of an architecture question than a technical one.I have an app which has the following structure.(Hypothetically changed for security reason)
A collection that stores a document for ...
0
votes
1answer
21 views
Rails: Calling a function in asset pipeline from JS response?
Somewhere in the application.js I am compiling I have this object and function:
chosen.coffee
Foo =
do_this: ->
$('.slider').slider()
$ ->
Foo.do_this()
This calls JQueryUI and ...
0
votes
4answers
38 views
Multiple file upload rails 4
I am using Rails 4. I want to upload multiple files of type doc, doc.x, pdf etc, but not any image file. I implemented 'jquery-fileupload-rails' gem. But while uploading it shows "Internal Server ...
0
votes
4answers
37 views
avoid repeating jquery event bindings
I got into a situation where some of the page contents are partially getting loaded in ajax, and that adds one compiled js including jquery_ujs, which then repeats all ujs events, like for instance ...
0
votes
1answer
31 views
ruby on rails- how to add a text-area field by clicking a + button
I have this simple form having 5 questions(text-areas) for a user to fill. I want a user to be able to add extra questions by clicking a "plus" button.
What is the easiest way to do this? please I am ...
0
votes
1answer
22 views
Is there a way in Rails to implement an image_tag type mouseover for just text? JavaScript & CSS solutions not working
Basic Problem: I have a line of text, and on hover, I want that text to change to something else. Basic, right? What's tripping me up is that the text in question is stored in a hash in my controller, ...
0
votes
2answers
49 views
jquery file uploader submit on click
I am using jquery file uploader. I am trying to make it so that rather than automatically uploading the picture like normal, the picture does not get uploaded until the submit button is pressed. I ...
1
vote
1answer
28 views
How to execute ajax query immediately and periodically in Rails
In Rails 4 I have index and show views for a class (zones) that have fairly complex javascript to update values. For DRYness, the HTML just creates a data-less layout and the js file inserts the ...
0
votes
2answers
22 views
rails - jquery file uploader not working when form is rendered via ajax
The following page successfully uses ajax and jquery-file-uploader to upload an image:
<%= javascript_include_tag "/assets/jquery.js" %>
<%= javascript_include_tag "/assets/jquery_ujs.js" ...
1
vote
0answers
15 views
Rails don't reload session-data immediately after AJAX call but only on reloading whole page?
Basically, I have multiple-select box in the page. When the select box is changed, i want to put in session all id's being selected (one or more). The reason why i need something like that is ...
0
votes
1answer
18 views
Drag & drop audio data from parentNode div
I'm building a sample pad where users can drag and drop audio snippets onto one of several divs (the sample pad). When the user selects, drags, and drops the audio, the sample pad should get the ...