similar to: Nested AJAX remote_form in form?

Displaying 20 results from an estimated 1000 matches similar to: "Nested AJAX remote_form in form?"

2006 Jul 07
2
Ajax "Waiting..." flash while round-tripping
I''m trying to figure out how to best allow a user to click a link_to_remote (or something like it) that will make the clicked thing disappear and replace it with a "Saving..." or "Please wait..." image until the server round-trip is complete. Once complete, it needs to replace the HTML in that span or div with text from the server. I imagine it will involve
2006 Aug 19
5
Form helpers don''t work with facade columns?
Hello all, I''ve been trying to use a facade column but I notice that the form helpers don''t seem to respect the facade. In the following example I''m trying to story the prices as Integer values but present them to the user as decimals. class Product < ActiveRecord::Base def price=(new_price) write_attribute(:price, Float(new_price)*100) end def price
2006 May 10
2
Redirect whole page from AJAX action that updates a div
Hi, I am calling an action via AJAX to update a div. The action needs to redirect the page in under certain circumstances. However, if I just use "redirect_to" in the action then of course what happens is that the page I want to redirect to replaces only the div, not the entire page, and I get messy nested layouts. Is there a way around this? Can I redirect the entire document from
2006 Jul 31
4
Text field not being submitted via form_remote_tag; works via form_tag
Hi everyone, Newbie here. I''m trying to get a textual form element to submit in the context of a form_remote_tag block and having little success. Oddly (or perhaps not), using regular old form_tag in its place does cause the elements to be submitted. Here''s the relevant partial ERb code: <%= form_remote_tag( { :url => { :action => :out, :id => pending_task } } )
2007 Feb 25
5
Dynamically uploading a list that's already in a form
I have the classic case of: Posts, and Categories. When the user submits a post, he has a drop-down list of categories. I want to put a "Add category" link next to the list of categories. This is already inside a form, so a "link_to_remote" that creates a small AJAX form inside the "submit post" form will not work because that will mean to embed a form in another
2006 May 31
1
Best way to render stuff inside a div and pass variables?
For example, I want to click a button or a link, then without leaving the page, i want the content of a <div> to change accordingly if I click the link1 I want the content1 to show up inside the <div>here</div> I made it possible by using: <%= render :partial => "icons", :collection => @packages, :locals => { :@icon_name => "-add-black-" }
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it generates. My code is as follows: <%= link_to_remote "Show Full Info", :update => "fullcontact" + reparray.last.to_s, :url => "/cm/full_contact/" + reparray.last.to_s, :classname => "contactlink" %> Which produces this HTML: <a href="#"
2006 Aug 15
2
Are form_remote_tag and submit_to_remote mutually exclusive?
Do I need to use submit_to_remote in conjunction with or instead of form_remote_tag? The description in the API docs. is confusing. Is the combination of form_tag/submit_to_remote valid? Is the combination of from_remote_tag/submit_tag valid? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Mar 08
6
Difficulty with params hash and submit_to_remote
Hi, Is there any trick to initializing the params hash via submit_to_remote()? I have a form with two submit methods - the regular, non-AJAX method, and the AJAX method. The regular method works like a champ. The submit_to_remote invokes the correct controller, but the params hash is empty except for the values for :action and :controller. I''d show my code, but it''s on
2008 Jul 21
2
using image with submit_to_remote
Hi How can I give an image to submit_to_remote .I could successfully do it with link_to_remote as below..But the same not working with submit_to_remote <%= link_to_remote( image_tag("/images/cancel.png", {:alt => ''Cancel'', :class=>"noborder",:title=>"Cancel"}), {:update => "search_contact_div", :url
2006 Apr 21
4
link_to_function with submit
I looked everywhere but couldn''t find it. I don''t want a submit_tag or image_submit_tag but a normal link that submits my form. Normally I would do this with a javascript like function sendForm () { document.forms[0].submit(); } but this doesn''t work with form_remote_tag link_to_function( ''Send'' , "sendform();") So the question is:
2007 Jun 07
6
Can't download files with send_data or send_file
I have a form_remote_tag that calls a method to print out a csv file for download. If I tell the form_remote_tag to update a div the data comes up in that div, but otherwise I can''t get the browser to acknowledge the sent file. >From view: <%= form_remote_tag :url => {:action => "csv_dump" }%> <%= submit_tag "Download Complete List" ,:name
2005 Dec 30
2
help on submit_to_remote
hi, read the API doc and made search with google but can''t get a precise explanation on how submit_to_remote work. can someone help on that? thanks
2007 Jul 22
4
single table inheritance problem
Hallo, I am having a very strange Problem with STI in my application. setup: - two tables one called "wikis" on called "categories" with a hbtm relationship. - the wikis table is the sti one with a model PageWiki being extended from Wiki (and the correspondig type column) Following happens: - server restart - get :wikis, :show_pages - in show_pages the first line says
2006 Jan 13
9
form_remote_tag breaks inside table
i guess its better form to keep form tags outside of table tags anyways, but it took a lot of trial and error to figure out thats why @params were no longer showing up after switching form_tag to form_remote_tag. not sure if this is a prototype ''bug'' or ''feature'' or what. but my next step was to switch to a seperate form tag for each row to reduce needless
2006 Jun 01
2
submit_to_remote with an image-tag?
Hi All, I am searching for a way to use an image as a submit button. I''m not having much luck using submit_to_remote with a image-tag, and I can''t use link_to_remote because I need to submit some form fields. I know this must be possible but I am missing something... Ideas anyone? Thanks in advance, Jens
2006 Jul 14
3
Accessing the Model class from Controller
Hi, I wonder if there''s an easy way to access the associated Model class from its Controller. Something that would allow me to write snippets like the following: class PeopleController < ApplicationController def some_method person_model_class = self.some_method_to_retrieve_the_person_model_class() end end Cheers, Marco -- Posted via
2006 May 08
7
How to get difference between two dates in days???
Hi, I want to calculate difference between Current date & previous date (stored in database). The difference should be in days. Hhow to do that?? PLs tell me. Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.
2006 May 18
4
Cascaded Forms
Hi guys, it''s me again ;) is it possible to put forms into forms? My problem is, i have a form which gathers informations about an SSL Certificate order. There is a field which holds the SSL CSR file. Now i wanted to put in a subform which has an form_remote_tag and decodes that CSR file and returns if everything was okay or not. Now if i put in a submit_tag it submits my form which