similar to: Caching RJS fragments

Displaying 20 results from an estimated 7000 matches similar to: "Caching RJS fragments"

2008 Sep 22
3
syntax error in RJS
I''m new to Ruby on Rails and came across a problem I could not solve alone. I''ve a pretty simple RJS file that looks like the following: 3.times do page.insert_html :bottom, ''messages'', ''test'' end page.call ''updateMessageWindow'' However this snippet gives a syntax error: ActionView::TemplateError (compile error D:/Eigene
2005 Dec 15
0
RJS Templates and the Replace semantics
I have an issue with the way replace_html works in an RJS template. This is a copy of a post on my blog (http://blog.craz8.com <http://blog.craz8.com/> ) that describes the problem and my working solution to the problem. If I have a collection of things that are output like this: <div id="things"> <% @things.each do |thing| %> <%= render :partial =>
2006 May 28
1
RJS template / page.insert_html problem
Hiall, I have a rjs template which is calling page[:xxx].replace_html ... a couple of times and this works perfectly. However, in the same rjs file I have two calls to page.insert_html, which do not work. No error in development.log, nor error message in browser, the new content for the div simply isn''t changed at all. This is my code: ... action = "save_" +
2006 Nov 18
2
RJS page.delay timing issues
Hi. Has anyone ran into issues with the timing of page.delay. I have been testing in firefox, for the most part, and it seems that there is no reliability on when the page.delay timings kick in. What happens is that sometimes it will work fine, and the countdown looks great; other times it will just jump to the end and display everything at once, other times it will be jerky. I''m on a
2006 May 30
0
The ARTS Plugin: Another RJS Testing System
If you missed it, I''ve written a plugin for testing RJS that uses (basically) the same syntax as the RJS templates themselves. Here''s a taste: assert_rjs :alert, ''Hi!'' assert_rjs :assign, ''a'', ''2'' assert_rjs :call, ''foo'', ''bar'', ''baz'' assert_rjs :draggable,
2006 Apr 05
2
RJS and remote forms
I''ve run into what I think is a browser bug related to using remote_forms pushed in an RJS update. In my controller, I have an action that creates a new model and returns a form for one of its children: def create_party party = Party.create render :update do |page| page.insert_html :top, ''party-list'', :partial => ''party_header'',
2006 May 13
2
Using RJS in views without ajax
Hi! I can use RJS in views like this (without using ajax): <%=link_to_function("switch fields", update_page do |page| page.insert_html :before, ''date'', date_select(''exhibition'', ''date'') page.remove ''date'' end) %> Is there a way to move this RJS code into a function to separate file? .js files are not parsed
2010 May 28
8
form helpers don't seem to work with RJS files...
I’ve been spending a great deal of time chasing this problem. Hopefully someone sees something obvious I’m doing wrong. Basically anytime I try to call fields_for from an RJS file or within a partial in the RJS file, I get the following error. My goal is simply to load a partial into a div. The fields in this partial require fields_for though. And that’s where the problem lies.
2006 May 02
1
Very simple RJS not working in IE
My HTML: <div id="search_div" style="display: none;"> <table> <tbody id=''search_results''> </tbody> </table> </div> My RJS: page.insert_html :bottom, ''search_results'', "<tr><td>Test</td></tr>" page.show "search_div" Now, everytime this gets called, it adds a
2006 Apr 19
4
RJS replace_html auto-closing tags
I''m using the following RJS template to spit out a div containing a list of projects: page.replace_html ''results'', ''<div>'' @projects.each do |p| page.insert_html :bottom, ''results'', p.name + "<br/>" end page.insert_html :bottom, ''searchresults'', ''</div>'' page.show
2006 Jul 11
0
malformed utf-8 character error
Hi, I am using ajax scaffold generator with charset=iso-8859-9(Turkish)... Edit & Create buttons work correctly when there is no turkish chars in the current record. But, if there are turkish chars in any of the fields in the current row, buttons don''t work... (loading indicator simply spinning forever...) I put the KCODE=''u'' line in
2006 Mar 03
1
rjs isn''t update_page problems
i have a list of, for example, meal_names. Basically, I can submit a name and the name I add shows up in the list.I had this working wehn i created an actual add.rjs template for it. So feeling good about my self, I attempted to move it all to the controller and use some update_page goodness. Now it the ajax middle doesn''t happen. I don''t get any errors but the list
2006 Jun 19
1
RJS Templates
I have a page that when a form gets submitted, I use page.insert_html to stick a div in another div. The problem is, when I want to refernce it later on, the IDs are not unique. So to get around this, I concatenated the id of the item to the end of the div name. Which is fine. I did the same in the RJS template as well, but it''s not finding that div. I tried it with string
2009 Mar 07
0
RJS: pass javascript variables in ruby calls
Hey, I have this link_to_function which takes an RJS block as follows: page.insert_html :bottom, :documents, :partial => "upload_fields", :locals => { :doc => Document.new, :index => ''UNIQUE_ID'' } It adds a partial to a div. I need index to be a unique id, but can''t generate one. I have an actual javascript function next_index() that will
2008 Jul 24
1
How to add link_to_remote element with RJS?
Hello, after executing an action, I add an <li> element to an existing list using a RJS template: page.insert_html :bottom, :contributors, "<li id=''contributor.#{@contributor.id}''>#{@contributor.user.name}</li>" but I need to add an image with a link_to_remote as I have in a partial page: <li id="contributor.<%= contributor.id
2006 Jun 08
3
RJS wierdness - Content div display js code
Hi, I have a link_to_remote name ''Show notes'', which calls an action that uses this RJS template: page.replace "notes_remote", :partial => "notes/hide_notes_link" page.insert_html :top, "notes_list", :template => "notes/list" page.visual_effect :highlight, ''notes_list'', :duration => 3 Works great. The
2006 Jun 27
5
RJS -- What am I missing?
This is driving me nuts:-) I''ve brought it down to a simplified case where I''m rendering this rjs template: page.insert_html :top, ''cat1'', "<li>Some list item</li>" According to FireBug, this is what I''m actually getting in the browser: try { new Insertion.Top("cat1", "<li>Some list
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my form page. Here''s my page: <div id="posts"> <ul id="post_list"><%= render :partial => ''list_results'', :collection => @posts %></ul> <p><%= link_to_remote(''+'', :url => {:action =>
2006 Jul 03
6
Rjs $("aaa").insertHtml is not a function error
Hi, I''ve searched the list and found that someone had the same problem as me http://lists.rubyonrails.org/pipermail/rails/2006-May/043760.html I''m have in my page a link like this <%= link_to_remote ("Add #{image_tag(''add.png'')}",:url=>{:action=>''addProduct''})%> and in my controller def addProduct ..................
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I did: create table categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote