similar to: How to combine rjs with ActiveView::Helper?

Displaying 20 results from an estimated 3000 matches similar to: "How to combine rjs with ActiveView::Helper?"

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 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2006 Jul 03
2
rjs renders string or partial but not template or action
Hi, I have an rjs file. I only have one controller called called front. I have views called "new_title.rhtml" and "_new_title.rhtml" These work page.replace_html ''title'', ''new title'' page.replace_html ''title'', :partial => ''new_title'' page.replace_html ''title'',
2008 Oct 29
0
RJS problem after upgrading to Rails 2.0.2
I just updated an old app from 1.2.6 to 2.0.2 and I''m having an rjs problem. I have one page that has 2 submit to remote buttons, one to do a price override and the other to remove the lineitem. Everything is working perfectly before the update but now the price override doesn''t update the page. I''ve verified that the price_override method still gets called because
2006 Mar 22
1
RJS - Still not working in IE
The previous thread on this topic got a little disjointed, so I thought I''d summarize the issue again, in hopes that someone could help. To re-iterate, this rjs works in Firefox and Safari on Mac, and in Firefox on Windows. It fails, in IE on Windows. The failure is that the second page.replace_html seems to do nothing. My environment is: Rails 1.0 + RJS Plugin Updated
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both Element.update and page.replace_html in an rjs. I can put a link_to_remote in the partial using an :update, and the div updates fine. Does anyone have any idea why this might be happening? In the partial: <div><div> . . <div id="question_<%=question.id%>_error"></div> . (if a
2007 Feb 13
1
RJS specs
Hi again... This is wierd spec problem no. 3. I''ve got a simple one line RJS file that renders a partial specified by the controller page.replace_html("product_info", :partial => @product_partial) The partials in question will contain purely static content - the idea is to have some dynamic links, so you hit http://localhost:3000/gap/product_info/product_1
2006 Mar 14
2
RJS & Unicode (again)
I have a problem with unicode & RJS. I searched several boards & blogs, but was not able to find a solution. Let me explain my problem with an example. View (test.rhtml): ... <div id="a_test_div">?????????</div> ... Output: ????????? RJS-Template (an_action.rjs): page.replace_html ''a_test_div'', ''?????????'' Calling
2006 Jan 29
1
RJS template problem!
hi all, i have the following controller: class UserController < ApplicationController . . . def login @user = User.new(params[:user]) @logged_in_user = @user.try_to_login if @logged_in_user session[:user_id] = @logged_in_user.id else flash[:notice] = "ung&uuml;ltige Daten!" end end . . . end with this rjs template: login.rjs: if @logged_in_user
2006 Apr 03
5
RJS Queue
Hi, I''ve been able to succesfully queue page.visual_effect commands in my RJS templates. Each command will wait to execute until the previous command is done executing. But I''d also like to execute a page.replace_html command AFTER the page.visual_effect commands. I have a series of five DIVs: div1 div2 div3 div4 div5 When the user clicks on div1, a page.visual_effect
2006 Mar 08
2
RJS - page object in helpers?
Hello, I am using RJS and Edge Rails and I was wondering if the page object should be available in helpers also. For example if I have a helper function def update_flash_messages page.replace_html ''flash_messages'', (show_flash_messages :textilize => true) page.visual_effect ''flash_messages'', :appear end and then in my RJS files I call
2009 Jul 28
4
RJS-Template and link_to_remote
Hi, I am quite new to rails and can''t use any rjs-templates. The problem is, that he can''t use/find the methods in that template e.g. ''page'' or ''replace_html''. I get an error message on these methods. Here''s what I got so far in my example: Controller: ---- class AjaxTestController < ApplicationController layout
2006 Jun 27
2
Bug in Firebug or in RJS? Or something else?
I''m getting a really strange result using RJS page.replace_html and wonder if anybody knows anything that could help me figure it out. I''m rendering a partial in a loop in edit.rhtml that puts a set of <div>s on the page, each <div> containing a checkbox_tag with an associated observe_field and a text_field_tag also with an associated observe_field. When the
2005 Dec 26
0
[rjs] How can I render a action template instead of partial
Hi, I want to render a action template with rjs, so instead of doing this: page.replace_html ''maincontent'', :partial => ''list'' I want to do this: page.replace_html ''maincontent'', :action => ''list'' but the render (that is called by replace_html, outputs to the reponds_body), so it doesn''t work. Is there a
2006 Feb 14
2
Inline list editing with RJS: best practices
I wanted to get the community opinion on the best way to use partials and inline list (<li>) editing. I have a very common scenario where a list is rendered: --- index.rhtml --- <ul> <%= render :partial => ''item'', @collection => @items %> </ul> --- _item.rhtml (simplified) --- <li id="item_<%= item.id %>"> <div
2006 Jan 19
1
rjs problems
Hi, I am having trouble with rjs templates. Basically I want the item_div to fade if its already open and then display the new item that the user selected with the visual effect: appear. The code below causes the browser (firefox on osx) to open the div and then close it again as soon as it is open: page.visual_effect :fade, ''item_div'', :duration => 0.5 page.replace_html
2009 Apr 20
1
RJS sporadic error message
I have this form that allows a user to enter a username and save it, assocciating your profile with theirs via an id. A list gets updated and a partial is displayed. The problem is that when I hit the submit button to this form to make this all happened I (sometimes, but more often then not) get an RJS error that reads: TypeError: Cannot set property ''innerHTML'' of bull. I hot
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 Mar 30
2
RJS and variables help...
How can I get mt RJS template to accept a variable as the ID value? Doing this works: page.replace_html ''1'', "some text..." This does not: page.replace_html @employee.id, "some text..." Looked and searched but little documentation at the mo especially in RDocs. -- Posted via http://www.ruby-forum.com/.
2008 Feb 29
0
RJS and EXTjs component update (RAILS 1.2.3)
I want to use an RJS view to update EXT Panel bodies. But since the panel bodies have generated element ids, I can''t see how to use ''page.replace_html''. So instead I wrote a javascript function ''updateBody''. In the RJS view, I want to say something like: page.call ''updateBody'', ''some_panel'', :partial =>