similar to: Trying to bind an appended partial that has REST_in_place attached to it with jquery?

Displaying 20 results from an estimated 400 matches similar to: "Trying to bind an appended partial that has REST_in_place attached to it with jquery?"

2009 Aug 23
0
Best way of moving some jQuery from a view helper
I have a helper that uses some jQuery code that I would like to move out of the helper method. I am trying to move it to application.js but it will probably end up in a different file. I have two reasons for wanting to do this. 1) I want to keep all my jQuery code seperate to my HTML code 2) I want to change the append to an appendTo so I can add a highlight effect, appendTo which is proving
2011 Sep 10
4
Finding HTML attributes with jQuery in Rails 3.1
I''m having trouble wrapping my head around the proper syntax to have jQuery (in an .js file) grab an HTML attribute and use the value of that attribute to load a partial. HTML fragment: <a href="/toggle" data-remote="true" section="training"> jQuery string (now setting a static partial, I need this to be dynamic)
2009 Jun 03
3
Appending a Rails Partial with jQuery
Im not sure which group to post in, so i thought i''d try both. Any Rails peeps that use jQuery? Im having a problem. I have followed Ryan Bates Screencast about inserting a partial with jQuery and currently have it working in my app. What i really would like is to keep all my code in my application.js file vs a bunch of files all over my view folders. This is what i have in my
2012 Aug 07
4
how to do render partial on jquery ajax success method with rails 3
I''m using rails 3.2.1 with jquery for an ajax call. My juqery code is : jQuery.ajax({ url: "/org_pages", data: ''org_id=''+ org_id, type: "POST", success: function(result){ jQuery("#image_center").html("<%= escape_javascript(render(:partial =>
2011 Nov 03
0
multiple render text in jquery rails
Hi, For one action of user based on condition i want to render different texts. So how do i achieve it through jquery? For example: A simple posting message application: On post button i have a post method which has security checks and other server side checks like : =========================== if message_text.nil? or message_text.empty? or message_text.length > 140
2010 Sep 27
6
Rails 3 + jQuery ; How to show error messages
Hi guys, can anyone explain how to show error_messages_on (like back in Rails 2 , without Ajax) fields that didnt'' pass the validation the jquery way. I googled for about 2 hours now and found nothing. Jquery works fine and adds the content to my table, but im totally stuck with the whole error/validation thing. My form looks like this: <%= form_for Translation.new , :remote =>
2011 Dec 13
1
continuous jquery partial update
Rails 3.1.x - jquery drag_drop.js $(function() { $( "[id^=moveable]" ).draggable(); $( "#droppable2" ).droppable({ drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) $.post( "groups/add_member/", { "add": ui.draggable.text() }, function(data) {
2009 Oct 06
0
[PATCH server] new host networking wui
Frontend and backend changes needed to implement http://ovirt.org/page/Networking_UX#Option_3 --- src/app/controllers/host_controller.rb | 38 ++- src/app/services/host_service.rb | 35 ++ src/app/views/host/edit_network.rhtml | 593 ++++++++++++++++++++++++++++---- src/public/stylesheets/components.css | 76 ++++ 4 files changed, 676 insertions(+), 66 deletions(-) diff --git
2009 Sep 04
2
escape_javascript error
Hello, I am using jQuery for all ajax stuff and recently got following error: ActionView::TemplateError (private method `gsub'' called for #<Array: 0x2425ae8>) on line #1 of... and the code where it happens: $("#notice_ajax").before(''<div id="notice_ajax"><%= escape_javascript (flash.delete(:notice)) %></div>'').remove();
2006 Nov 04
0
stumped trying to escape javascript
So I''ve got a few forms that update info using Ajax and form_remote_tag. I''ve got a javascript function that I call from within my render method in my controller, to take the contents of the flash and display them in a div that appears and then disappears. I''m using the following: render :update do |page| page << ''ShowMessage("''
2012 Feb 17
0
Passing a value to js.erb
Rails 3.1.3 I''m trying to pass a value to ''save.js.erb'' . in the view, I have put <%= hidden_field_tag "video-id", @video.id, { :id => "video-id" } %> then, I can retrieve it by var idval = $(''#video-id'').val(); It certainly gets the value. The problem is then I need to pass it to the following. I tried,
2010 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser via ajax. Something like: $("#inject").html("<%=escape_javascript(render :partial =>"feed/ index")%>"); Problem is escape_javascript ends up outputing all kinds of wasted space like \n\n\n\n\n \n Is there anyway in Rails to escape_javascript more
2011 Nov 29
1
ajax question
Hello, could you please explain what''s wrong with this code: Rails 3.1.1 skills_controller.rb class SkillsController < ApplicationController # GET /skills # GET /skills.json def index @skills = Skill.all respond_to do |format| format.html # index.html.erb #format.json { render json: @skills } format.js end end end index.html.erb <%=
2009 Oct 19
1
Combobox population by means of JQuery and Ajax.
This is the view municipalities.js.erb I have: <% list_opt = options_from_collection_for_select(@municipalities, :id, :name) %> <% puts list_opt %> #ok! list_opt contains the options $(''#municipality_id'').html(''<%= list_opt %>''); and this is the combobox in the view: ... Comune <select id="event_municipality_id"
2011 Jun 08
1
Problem with escape_javascript in 3.0.9rc1
Specifically, this does not work! $("#lightbox_content").html(''<%= escape_javascript(render(:partial => "form")) %>''); Is this the correct way to do JQuery html replacement using a partial? This works fine in 3.0.7. Tony -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to
2006 May 19
1
how to access ActionView::Helpers::JavaScriptHelper::escape_javascript in a model (a newbie question)
Hi all, Please forgive me for this newbie question. But I really want to know how how to access ActionView::Helpers::JavaScriptHelper::escape_javascript method in a model. I can access this method in view, but when call it in the model, it ends up with undefined method. It seems to me they are in different scope. So what''s the best way to access view helper methods in model. --
2012 Jan 03
1
Rails 3.1 assets pipeline issue in production
I am running a jwplayer with an open ads server plugin .. it''s running fine in development, ads are served , but not in production on the remote server... I guess it''s related to the plugin file access ... in development , I wrote in the script : ''plugins'': { "/assets/jwplayer/ova-jw.swf": { "overlays": {"regions": [{
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",
2011 Sep 27
1
Rails 3.1 assets path for video player Flash script 'player.swf'
I was using a Flash video player within a previous Rails version app Moving to Rails 3.1.0 , I dob''t know where I should put the script ... I tried to move it into an app asset sub-directory assets - jwplayer - - player.swf but this raises an error "NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf" player.swf the flash script is given as a
2011 Jun 15
5
rails 3.0.9
Today was expected the new stable rails release 3.0.9 with some fixed, among all the problem with escape_javascript. It seems that it see that has not been released, unfortunately. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to