similar to: How to render :partials *before* the :action has finished ?

Displaying 20 results from an estimated 2000 matches similar to: "How to render :partials *before* the :action has finished ?"

2010 Jul 30
2
:disable_with combined with Ajax form: Possible?
Hi there, I''m trying to have an Ajax form with a submit button that has the :disable_with feature, but the submit button does *not* disable... I tried like this: = = = <% form_remote_tag :url => { :controller => ''profiles'', :action => ''update'' }, :method => :put do -%> <%= submit_tag ''Save'', :disable_with
2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2006 Aug 30
10
respond_to not detecting JS turned on. form_to_remote problem?
I''m trying to use respond_to to redirect visitors who have JS turned off to a different page. The problem I''m having is that respond_to is sending *everybody* there. It''s not recognizing that JS is turned on in the browser. The wanted_html.rhtml file below is rendered whether I''ve got JS turned on or off. I''ve looked at the Accept headers being sent
2006 Nov 11
1
Disable foms when submitting
Hey, I want to disable the form when an user submits, I know that u can do this with javascript. But i dont want to put code for each form on my website, and I have a lot of forms like.. <%= start_form_tag :action => ''create'' %> <table width="100%" border="0" cellpadding="0" cellspacing="5"> <tr> <td
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert
2006 Jul 26
0
page.replace_html render(:action => ''other_action'')
I want to be DRY. I have a controller action, component, that renders html. I have another controller action, component_update, that returns RJS: This what I''d like for ''component_update.rjs'': page[params[:scaffold_id]].replace_html render(:action => "component", :layout => false) page[params[:scaffold_id]].visual_effect :highlight But, the render is
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'',
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 Jan 26
2
link_to_remote > in :action , interrupt ajax to render a new page outside the :update div ?
Hello, I have a simple link_to_remote that refresh a div. I just want to know if it''s possible to interrupt the div''s refresh inside :action to perform a complete reload of the page, outside of the div Actually, I havea a new page, but loaded inside the ":update" div. Someone have an idea please ? the rhtml: **** link_to_remote "yeah" , :update =>
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using form_remote_tag, which calls a controller action which adds a comment and then sends back some JS via RJS which updates a few items on the page. It did work fine but (and I''ve no idea what has happened) now it doesn''t. It calls the controller action but gets an empty response back and
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 Apr 03
3
render :partial + redirect_to :controller
This is of course disallowed, which I discovered only after nearly completing my spanking new ajaxified UI. What is the motivation behind this, and what is the best workaround? This UI does a scriptaculous drag-and-drop of items from a first div (div1) over to a second div (div2), which triggers the contents of div2 to be updated to reflect the drop. No prob, thus far. But then the
2006 Jun 27
2
Render partials in folders
Right now I have partials in a view folder corresponding with my controller. ie: controller: example, view: example/_partial.rhtml and I call it with render :partial => ''partial'' How do I add the partial to another folder and call it? ie: controller: example, view: example/new_folder/_partial.rhtml render :partial => ''new_folder/partial'' # does NOT work
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
2006 Feb 21
1
formhelper methods don''t work with render collection partials
I''m rendering a partial using a collection: <%=render(:partial=> ''record'', :collection => @records)%> Inside the partial, I''m attempting to create a new form for each row, generating elements like the following example: <%= text_field "record", "name" %> However, though my objects are fully populated, these form tags
2006 Sep 26
0
Is it possible to render RXML partials in RHTML templates?
I have a RHTML template and I would like the output of a RXML partial to be embedded within it. When I do <%= render(:partial => ''list_edit'') %> where there exists a _list_edit.rmxl file, I get XML parsing errors in the browser - I believe because the partial is causing the rendered content to be identified as XML instead of HTML. Is there any way to
2006 Jul 26
3
Getting Ajax.Updater or page.replace_html to render js?
Hey guys, I, for the life of me, cannot figure out how to get Ajax.Updater or page.repalce_html to render the javascript in a partial. Upon page loading, the partial gets rendered fine. But when called up to render through an AJAX function something goes wrong. Are you guys getting this error??? -- Posted via http://www.ruby-forum.com/.
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects to the latest element created. Here is what I''m doing. =========================================== 1) Creating an "item" via an action, then rendering the RJS template 2) RJS template looks like this: page.insert_html :top, ''items'', :partial =>
2008 Oct 18
5
render :update / page.replace_html problem
Hi there, I have this ajax problem, I''m desparately trying to debug since 1 entire day now: The Controller includes: ======================== [...] render :update do |page| page.replace_html ''coverletter_part'', :partial => ''user/applicationfiles/coverletter_part'' end [...] The View includes: ================== [...] <div
2007 Oct 25
0
How to spec a render:update call
Hi folks. I''m trying to work out how to verify that a controller has called a render:update block similar to: render :update do |page| page.replace_html ''edit'', :partial => ''form'', :locals => { :operation => ''edit'', :submit_button_value => ''Update'' } end We used to test this with something