similar to: page.replace_html render(:action => ''other_action'')

Displaying 20 results from an estimated 7000 matches similar to: "page.replace_html render(:action => ''other_action'')"

2006 Jul 24
0
Ajax page.replace_html model validation render partial errors
Hi; I have the following setup: A model: that validates using helpers like: validates_presence_of, etc.. A view: called ''new'' which renders a partial The partial: _form which has error_messages_for and a form_remote_tag , submit_tag and end_form_tag An action ''create'': that gets executed via the submit_tag in the _form and which in case it can''t
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 Jul 04
0
Help with first AJAX action
I''ve used Rails for a while, but haven''t really done any AJAX until now. Now I''ve been fighting for days with my first AJAX action and after reliably crashing Safari and throwing errors in IE, I''m finally coming to the list for help. :) I have a "controls" div in my layout. This div displays a list of page-specific actions. When some of these
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 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 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 Jul 21
0
Ajax page.replace_html model validation errors
I have the following setup: A model: that validates using helpers like: validates_presence_of, etc.. A view: called ''new'' which renders a partial The partial: _form which has error_messages_for and a form_remote_tag , submit_tag and end_form_tag An action ''create'': that gets executed via the submit_tag in the _form and which in case it can''t
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 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 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 Apr 19
1
AJAX - update item forms problem
I have a table showing some records from the database. These records should be always ordered by some datetime field. The list of items is changed by AJAX using RJS scripts and edits are done by showing and hiding an update form under a chosen row. Adding and updating rows works great but my problem is when the order of items is changed after making some AJAX datetime updates update forms of
2006 May 28
0
expanding details examples?
I''m currently using page.visual_effect :toggle_appear to toggle the appearance of details associated with an order. As I am inserting the detail data prior to making it visible, this method is not appropriate (it also loads the data on hide). I was thinking I could change the hide/show href each time it is clicked, or even store a value on the page and toggle it each time
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
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 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'',
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 May 03
1
error_messages_for when saving within another model
Hi, I have this save routine: def customer_address_create customer_options @customer = Customer.find(params[:id]) @customer.addresses.create(params[:address]) @saved = @customer.save end That passes to a rjs template like this: if @saved page.visual_effect :Fold, ''add_address'' page.replace_html ''addresses'', :partial =>
2006 Jul 24
2
BIG JS limit? Using replace_html with partials containing JS
Hello, It''s pretty hard giving a practical example on this one. I have a partial which contains some generated Javascript. Something like: order_screen.rhtml ------------------------------------------- <h1>Order</h1> <div id="order_part"> <%=render :partial=>''order_new'' %> </div> <h1>Ordered products</h1>
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 May 25
2
page.replace_html
This is odd. When I call: page.replace_html ''formdiv'', :partial => ''listing'' from an rjs file it renders stuff like: \n \n \n test \n \n test , NY 12344 \n \n Phone: (999)999-8888 \n\t\t\n\n \n \t\n \t\thttp:// \n \t\n \n \n \n"); } catch (e) { alert(''RJS error:\n\n'' + e.toString());