I have a model Locations with two columns latitude and longitude. I want to find a way where I can get the list of locations and pass them to google maps using Ajax and javascript. So far my code is as follows:  map.js:  function initialize()  {...
I'm using ckeditor in my rails projec and I have a problem with image uploading. I don't want everything that ckeditor have, that I wrote some simple config.js for it:  CKEDITOR.editorConfig = (config) ->   config.language = 'pl'...
I want to know the content type of a given url input by the user inside my Javascript code. Actually, I have a drop-down list (html,csv,xls etc.) and I want to make it so when the user inputs an url, I want to detect the type of the content of the ur...
I'm using Rails 3.2.9. When I add CoffeeScript code to a .js.coffee file in the /app/assets/javascripts directory, I get the resulting JavaScript in all of my webpages. The problem is all the JavaScript is wrapped in:  (function() {   // my code...
I have a Ruby On Rails(Ruby 1.9; Rails 3.2.13) application. I am trying to create charts using Highcharts. But i am getting an error on browser as Sprockets::EncodingError in Product#index sample/app/assets/javascripts/highcharts.js has a invalid UTF...
bundle exec rake assets:precompile   which compiles assets and moves them into public/assets/  Now suppose i already compiled assets and deploy on production, Now i comeback to my local machine and changes two lines in some javascript file Now I have...
I have a cart implemented and after someone adds an item to the cart they can change the quantity and click update to make the required changes. However, after it has been clicked I want it to say UPDATED!  And now if someone clicks on the field agai...
We have a conf/environments/production.rb file that lists all the js files individually, e.g.  conf.assets.precompile += %w (highcharts.js) conf.assets.precompile += %w (schedule.js) conf.assets.precompile += %w (new_event.js) conf.assets.precompile...
Well i am trying to do a dynamic combo select inside a partial. and the value of the batch no stays the same, ie whatever batch no i select in first partial rest of the partial has the same value.  Code is as follows  Form  <%= nested_form_for(@bi...
I'm trying to render diferent forms for each type of tool inclusion on my system. I wish i could do this in a simple way, so i tried:  View:  <span><%=  radio_button :tool, :tool_type_id, "1", :onclick =>  "render_partial(...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.