similar to: Ajax and onsubmit

Displaying 20 results from an estimated 9000 matches similar to: "Ajax and onsubmit"

2008 Apr 09
13
submitting an ajax form via javascript not rendering
for some reason the controller is parsing everything fine, but the return is a page instead of code execution. I have other ajax forms no listed that are also running fine on this same page. there are supposed to be 3 ajax events: onblur event that calls a function to submit - doesn''t work. There is a submit button at the end of the form - works there is a delete image that removed the
2006 Jul 27
1
form_remote_tag
How can I get a name/id for a form using the remote form tag? <%= form_remote_tag :url => { :action => :add_to_cart, :id => timecard } %> gives me: <form action="/timecard/add_to_cart/4" method="post" onsubmit="new Ajax.Request(''/timecard/add_to_cart/4'', {asynchronous:true, evalScripts:true,
2006 Mar 22
0
Changing the onsubmit event using an RJS template
Hi there, I''m currently writing my first ROR application, and must say I''m loving the framework. Just a quickie, which people will probably instantly know the answer to. I''ve got a select box which I want to be able to add values to on the fly using AJAX. I''ve got the form all appearing and updating the database, however, what I want to be able to
2006 May 03
1
form :onblur => ''this.form.submit()'' doesn''t do AJAX
Hi, I''m looking to create a form that gets submitted using AJAX after an element loses focus. <% remote_form_for :person, @person, :url => { :action => "save" }, :update => ''form'' do |f| %> <label for="person_fname"><span class="req">*</span>Name</label> <div class="form_el"> <%=
2006 Jun 23
3
form_remote_tag is not passing form params
I''ve searched and searched and searched again, and I cannot find any help with this problem. There''s an identical problem on this forum, but it was never resolved. I''ll try to re-open the subject with a bit more information. Problem: The form_remote_tag() method in my "list" view is not passing the params[] hash of the values stored within my form.
2009 Feb 10
2
form_remote_for NOT passing param: I want put and I get post
Hello, I''m struggling my brain with this ajax issue ... Basically I have a form for creating records, and I want to submit it using Ajax. On previous versions of RoR (2.0.2) it was working, but the same methods doesn''t work on 2.2.2, and I started to make changes and changes and read forums and the api, but no way ... <% form_remote_for (:expedient, :url => {:action
2009 Mar 18
1
Ajax file upload with remote_form_tag
when I tried below, it worked <form target="upload_iframe" action="/profile/validate_charts_file" id="upload_charts" method="post" enctype="multipart/form-data"> <input type="file" name="charts_file" id="filename" /> <input type="button" name="submit"
2006 May 10
3
AJAX reload
Ok I stole some script and I need some help on fixing it on one thing: Reloading on post. here''s the script: <div id="panel"> <form action="/loging_in/login" class="header-panel" href="/loging_in/login" id="login-panel" method="post" onsubmit="new Ajax.Request(''/loging_in/login'',
2008 Apr 15
2
NoMethodError in StoreController#add_to_cart
I''m trying to set up the Depot app from Agile Web Development and I got this error after C1 - Creating a Cart. The exact error looks like this: ------------------------------------------------------------------- NoMethodError in StoreController#add_to_cart You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end (For the purpose of this exercise, category names are unique) I have the corresponding delete.rjs file: if @element_id page.remove :id => @element_id page.visual_effect :highlight,
2006 Apr 27
1
Ajax response won''t display
I''m hopeful that this is something simple i''m missing, but I''ve run out of things to try. It should work just like the example in Agile Web Development with Rails (i think) I send an ajax request using remote_form and it''s processing correctly on the server and returning a new form, but it won''t replace the original. It''s supposed to update a
2007 Feb 07
1
The Depot "Add to Cart" sessions question (2.ed agile book)
Hello, Im in the process of working my way through the 2.ed of the agile book. As many of you already know, the book goes through the regular development cycle of the Depot application. I have hit a wall when they started talking about the sessions and the exact mechanics of how an item is added to the session. The code looks like this: depot/app/controllers/store_controller: def add_to_cart
2006 Jan 10
5
using dynamic element ids with visual_effect
Mike and I demo an Ajaxified version of the Depot application in the Rails Studio. Part of the demo is a cart in the sidebar which updates when you add a product to it. As well as updating the div, it also highlights the most recently added link item. Right now, we do it with: <script language="JavaScript"> function flash_cart(request) { var id =
2006 Mar 13
2
Prototype ajax/javascript q
I''m trying to send to my application the coords x,y on an "input type image" in a html form, but x,y variables are not present in the POST_DATA (are not submitted). Any other field (hidden inputs) are being sent when I click on the image input form field. I use rails 1.0 and prototype 1.4, browsers Seamonkey 2.0, Firefox 1.x and Konqueror, Linux, and I''m just a
2006 Feb 26
0
NoMethodError in Agile Web Devleopment Depot Tutorial
I''m working on building the shopping cart in the Depot tutorial in the Agile Web Development book. I''m at the part (about page 80) where you build the ability to add items to the cart. I''m able to get to /store/display_cart/ and it seems items are being added, but if I just click on a link to add an item (/store/add_to_cart/2) it gives me this: NoMethodError in
2007 Jun 03
3
remote_form_for issue
Hi everybody, I''m trying to change my current forms in my app to remote_forms. It was my understanding that remote_form_for and form_for work in the same way, so I just wanted to change the methods. My code looks like: <% form_remote_for :post, :url => posts_url do |f| %> <%= render :partial => ''form_posts'', :locals => {:f => f} %> <%=
2006 Apr 20
0
problem in "depot" app - cart contents not shown on checkout
Hi all - I''m working my way through the "depot" tutorial. I''m having a problem with the section where the cart contents are displayed on the order page. The cart contents display fine after I add an item to the cart, but simply does not show up on the order page. Any help would be appreciated. I''m running Locomotive 1.0.0c on Tiger with MySQL from
2006 Jun 12
0
Passing parameters to ''remote_function''
Hi, I am trying to use the ''remote_function'' helper method from the PrototypeHelper class on a the onblur event of a text_field for filling a form with data via AJAX. How can I get the value of the text_field for making a query to the database in the controller action? <%= text_field("item", "code" , :onblur => remote_function(:update =>
2006 Apr 06
2
Java: How to interact with ruby generated fields
Hello community, I''m new to rubyonrails and to this Forum. I have to call 2 Fields, generated by ruby, from a javafunction (onSubmit) but when I use this example it didn''t work, why? <%= start_form_tag({:action=> "show"}, { :onSubmit =>"post[testfieldone].value=examplefunction(post[textfieldtwo].value+post[textfieldthree].value);" }) %>
2006 Nov 23
3
Prototype Safari onSubmit Issues
Hi folks. Another Prototype question. I have a simple ajax form which I want to return results on an onChange. Works in IE6 (Win) and FF, but Safari doesn''t seem to take the onChange too well. Upon the return key, it blanks out the form. Upon tabbing to the next field (actually the next form), I get the results. <form name="form1" id="form1"