I have this Javascript view in my Rails 3 project:  app/views/expenses/new_daily.js.erb  var i = parseInt($('#daily').attr('data-num')) + 1; //$('#daily').append('agrego fila ' + i + ' <br />');  $('...
I am trying to use insert an Javascript variable in the <%= %> tags but it prints the variable name verbose. Here is my code  <script>      function getGraph(agency,device_id)       {             var i = document.createElement('img...
In my modal, I have a link. The link is written as follows:  <%= link_to "HIDE DETAILS", '#', class:'right' %>   When I click on that link, I want the link to display "SHOW DETAILS" instead of "HIDE DETAILS&#...
I created a checkbox in my html.erb as the following:   <%= check_box_tag(:fenix_fee_charged) %> <%= label_tag(:fenix_fee_charged, "FENIX_FEE_CHARGED") %> <%= check_box_tag(:fenix_fee_no_charged) %> <%= label_tag(:fenix_f...
I have a functionality of posting messages to a group which works using AJAX via Jquery. When I click on the "Post" button which is the value of the submit_tag, javascript is rendered and the page without reloading displays the latest message...
I am using bootstrap-markdown to add a markdown editor to my page and save the content parsed to html in the database. The problem is that (although i believe it should) it does not save the html result but the raw text instead.  this is my code:...
I'm struggling with some Javascript in my first rails application.  Partial: _care_point.html.erb  <script>   $(function() {     $( ".draggable" ).draggable({grid: [50, 20]});     $( ".node_input").each (function() {       $...
What is the best way to load a different Javascript file based on your environment (production or development) in Rails 3.2? I'm trying to create a global (yes, global) javascript variable which should vary based on environment. That variable is...
I'm using notices in Rails and Devise and wondered what's the best way to display them?  In my application I also have it so when a user saves a post, it saves it using Ajax and I use jQuery to display a notice.  For all the notices I use:  &...
This is giving me a major headache...  So I have an app which requires a sidebar that lists various information to do with a user's player. One section of this sidebar is a friends list. Now, when Player A sends a friend request to Player B, the...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.