similar to: JavaScript Form Submit with form_remote_tag

Displaying 20 results from an estimated 2000 matches similar to: "JavaScript Form Submit with form_remote_tag"

2006 Aug 18
0
AJAX question
Dear all, Help me get a simple AJAX behavior right. I know zero AJAX, thus please advice. Below is a simplification of the real code and I hope I can describe my intention clearly. class StoreController < ApplicationController def show_cart @cart = Cart.new @new_item = CartItem.new end def add_item @new_item = CartItem.new(params[:new_item]) if
2006 Aug 18
0
Simple AJAX question
Dear all, Help me get a simple AJAX behavior right. I know zero AJAX, thus please advice. Below is a simplification of the real code and I hope I can describe my intention clearly. class StoreController < ApplicationController def show_cart @cart = Cart.new @new_item = CartItem.new end def add_item @new_item = CartItem.new(params[:new_item]) if @new_item.valid?
2006 Apr 10
3
form_remote_tag can only have one submit button?
I setup a form_remote_tag with several submit buttons, all of them share the same name ( ''do_action'' ) and their values differ. eg. button1 named do_action with value ACTION1 button2 named do_action with value ACTION2, etc No matter which button I press the value passed is always the one defined for the first of these buttons ( the correct value associated with the pressed
2006 Feb 02
1
What''s the javascript to submit an AJAX Form?
HI Everyone, How do I form the href on an anchor so I can create a link-style submit for an ajax form? In this snippet, the INPUT generated by #submit_tag works OK, but the anchor results in the AJAX replacing the whole page? Can I make the anchor/href submit the AJAX form as well? Thank you! I have this (list.rhtml): <%= form_remote_tag :url =>
2006 Jul 06
7
form_remote_tag submitting to an rjs file.
I have the following form that I am trying to use, but for some reason, the form gets submitted with out the params values. <%= form_remote_tag(:url => { :action => :add_item_to_order }) %> <tr> <td> <%=collection_select(:order_item , :item_category_id, @item_categories, :id, :name)%> </td> <td> <%= text_field
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 } } )
2006 Jun 12
2
dom id on form_remote_tag
I want to make use of a form_remote_tag to submit a form asynchronously. Easy done. However, we also want to add an observe_form tag to check for some value changes while the form is being entered. The observe_form tag needs a dom id to work on but I can''t see how to enter an html option for the dom id of the form on the form_remote_tag. Any ideas? Here is the form tag so far...
2006 Nov 04
0
form_remote_tag problems with post url
Hi, I''m hitting a bump with the form_remote_tag, and wondering if anyone can help.. SO i''m trying to implement a tag-based search on a site and using routes, I can enter a url such as http://localhost/tag/query , which calls an action ''search'', and returns all the posts which are tagged with the word ''query''.. fine... In the
2006 Jul 22
0
form_remote_tag and send_file
All, I have an existing form that calls an action which in turn creates a PDF and sends it to the browser using send_file. I want to change this form to use form_remote_tag so that I can set a progress bar and once the PDF is finished, the progress bar hides and the PDF opens. The send_file data is being sent to the browser, but not displayed anywhere. When I use a regular form post, it
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all, How can i use form_remote_tag inside the form_tag helper . My application has following view subscribe.html.haml - form_tag :action => :subscribe do /other form element %input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"} %input{:type=>''radio'',
2006 Mar 15
2
Using form_remote_tag, setting the form name
I''m using form_remote_tag like this: <%= form_remote_tag \ :update => "div_id_dataentry_bottom_ajax", :loading => "document.getElementById(''wait'').innerHTML=''Loading...'';", :url => { :action => "dataentry_bottom_edit" } %> And it makes this code: <form
2008 Jul 22
0
Re: submitting form_remote_tag with text button?
I don''t have the time to check the details myself, but have a look at the generated html. You''ll find, that fom_remote_tag generates an onsubmit event handler for the form. Either take that code or invoke the onsubmit event. (I would have thought that happens, when you call form.submit, but never trust javascript ;-) --~--~---------~--~----~------------~-------~--~----~ You
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div
2006 Jul 27
1
form_tag vs form_remote_tag ----- the :condition option
form_remote_tag has a really useful little thingamob called :condition. you give it a string which is then interpolated into the form tag in such a way that the form is only submitted if :condition evaluates in javascript to true. so the logical thing to do is give it a JavaScript function <%= form_remote_tag ( :condition => ''your_function_here()'',
2006 Mar 28
5
Is it possible to upload file with form_remote_tag?
I have tried to upload a picture file with file_column plugin and form_remote_tag, but no success. When I do request.params.inspect it shows null for picture parameters. With normal form the file uploads nicely, so is it possible to upload file with form_remote_tag? -- Posted via http://www.ruby-forum.com/.
2006 Jul 03
7
form_remote_tag with multipart/form-data
Does form_remote_tag supports multipart/form-data ? My form looks like this: <%= form_remote_tag :url => { :action => ''do_image_upload'' }, :html => { :enctype => ''multipart/form-data'' } %> <%= file_field ''image'', ''file_data'', :size => 32 %> <%= submit_tag
2006 Aug 15
0
Can you use form_remote_tag to upload files?
I have the following form_remote_tag: <%= form_remote_tag(:update => ''target_lists'', :url => { :action => ''upload_list'' }, :html => { :multipart => true }) %> I then submit using a regular submit tag <%= submit_tag ''Upload List'' %> Does the Form.serialize call that is
2006 Jul 11
0
Please please somebody RESCUE me Reg. form_remote_tag !
Hi frenz, I need to update "div_main_data" on click of one submit button and I need to update "div_member" on change of one select option. But couldn''t find any solution at the moment. If I use -> :onChange =>''this.form.onsubmit()'' this update the whole "div_main_data" as I couldn''t toggle the update parameter in
2006 Jul 11
1
form_remote_tag ISSUE !
Hi frenz, I need to update "div_main_data" on click of one submit button and I need to update "div_member" on change of one select option. But couldn''t find any solution at the moment. If I use -> :onChange =>''this.form.onsubmit()'' this update the whole "div_main_data" as I couldn''t toggle the update parameter in
2006 May 12
1
Uploading a file with form_remote_tag problem.
params[uploaded_file] is not recognised when i try form_remote_tag like this: <%= form_remote_tag :url=>{:action => "save_file"} ,:html=>{:multipart => true} <%=text_field_tag "name"%> <input type="file" id="uploaded_file_file" name="uploaded_file[file]"/> <input type="submit"