similar to: rjs rails to execute?

Displaying 20 results from an estimated 6000 matches similar to: "rjs rails to execute?"

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 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
2005 Dec 25
5
RJS not working?
I''ve been attempting to add a simple rjs ''delete'' method to my project. However, no matter what I try, it simply doesn''t work. Even the easy, easy stuff seems broken. (Yes, <%= javascript_include_tag :defaults %> is being included in the template.) For example, from: http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates VIEW: <h1
2006 Jul 16
6
How to access element attributes using RJS?
For example, in the following block: page.select(''.foo'').each do |element| ... end How would I access, just for example, the id attribute of each element in the collection? I''ve randomly tried element.id and element.attributes[''id''], but neither of those has worked. I''ve also been unsuccessful in finding any documentation on this, but it
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 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs templates to no avail What I''m trying to do is fade an image, change the div with the image to a new image, and then fade the new image back in. How would I go about this in RJS Here''s a simple line from my rjs that I can''t get to work. It is not using callbacks so the
2006 Apr 27
7
RJS & Ajax question...
Hi, I''m trying to convert an older Rails application to use Ajax. I''ve already moved my edit and show actions so that, instead of displaying as separate pages, they appear in a <div> on my list view. However, I have two problems: 1) When the user saves the changes, I want to put all the ajax changes in an RJS template. However, form_remote_tag :url =>{:action =>
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
2006 May 02
4
passing data from controller to rjs and then to partial
Hello Experts, I am fetching data in my controller from a web service def search response = @@api.DoSearch() end and in my .rjs template, I am doing page.replace_html ''fields_chooser'', :partial => ''fields_chooser'' ,:locals =>{:response => response} page.visual_effect(:Appear, ''fields_chooser'') and in _fields_chooser.rhtml, I
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line. page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5 It works fine if I have created the div with the id="comment_error_details", but if I haven''t created the error yet then my whole rjs template fails. How can I check to see if an element has been created? I could then put
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
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 Feb 18
2
Effect queues with RJS templates and scriptaculous
Hi. I was wondering if it''s possible to combine effects for individual elements with RJS templates. I notice that scriptaculous has support for a concept called effect queues (http://www.railsdevelopment.com/2006/01/15/effectqueue/). Is there anyway to use these queues from rjs?
2006 Aug 09
2
Can :before and :success move from view file into .rjs file?
Within the RJS template is there a way to specify when the visual_effect should occur? I''m trying not to repeat the :before and :success blind_down visual_effect statements throughout my views. It seems like the rjs templates can only take visual effects statements in the form of page.visual_effect :blind_up, ''divname''. I can''t figure out how to add
2006 Jun 23
2
Queue 3 or more RJS actions
My .rjs file page.visual_effect :BlindUp, "people", :queue => ''front'' #first action page.replace_html "people", :partial => ''person/person_compressed'', :collection => @search_results , :queue => ''end'' #second action, after first is done page.visual_effect :BlindDown, "people" , :queue =>
2006 Mar 20
1
RJS & IE Woes
Hi, I''m trying to do a very simple slide_down effect with RJS templates. Basically a user selects a check box and a text box slides down. This works great in firefox, but causes IE to crash. The text box appears and slides down. Then the browser crashes. the in the partial is <div id=''forklift_div''> <label for=''incident_forklift''>Was
2006 Nov 02
5
RJS error in internet explorer
hey all, got a rails app i''m finishing up. i have a little ajax on one of my pages where the person can choose a doctor from a drop down list and if the doctor isn''t there they can click a link which blinds down a little form to add a doctor. after they submit that mini-form the page updates the div which houses the drop-down so the doctor shows up. works very nicely IN FIREFOX.
2006 Feb 06
6
.rjs template doesn''t load?
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060206/cf123b71/PGP.bin
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think should be a simple effect, but have not had any luck yet and apparently I am not following the general idea... What I am trying to accomplish is the following (part 1 works and part 2 does not): 1. One of my views has a link_to_remote which updates a div container with a table of data my example is <div
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi, Problem Summary: I have been trying to add the highlight effect to my table but everytime a new record is added the highlighting gives an rjs error. However when i click the add to cart button on a product that already exists inside the table, the highlight effect works. Is this because the partial must only have only one <tr></tr> in it and the <table> must be on the other