similar to: Submit a form_remote from arbitrary JS

Displaying 20 results from an estimated 2000 matches similar to: "Submit a form_remote from arbitrary JS"

2005 Dec 29
2
form_remote, getting data from submit
Hi list, I'm writing a little survey application, and surveys are generated dynamically. I use form_remote_tag and AJAX to submit the form to a method 'submit' in my 'survey' controller. The view generates the form as: <tr> <td>Question 1?</td> <td><input id="resultset_1" name="resultset[1]" size="30"
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 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"> <%=
2005 Nov 19
3
Form values not included in submit when ajax generated.
Hi. I have a form with two select lists, named ''project'' and ''activity''. The content of the ''activity'' list is changed when the selected item in project changes, using ''observe_field'' where project is observed, and a div enclosing ''activity'' is updated. This works as expected. The problem is that when
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 May 01
0
RE: Leak in the Autocompleter, with scrollable result-div ?
Hi Ed The reason it adds a new onblur is because when you click the scrollbar the event is gone. I dont know why and how to prevent it, but without adding it back the onblur does not get triggered and the layer does not hide when you click somewhere else on the page. If anyone finds a better solution, please provide a patch. I still have not been able to make the blur work on Safari, so Thomas
2006 May 01
0
RE: Leak in the Autocompleter, with scrollable result-div ?
Tommy, Every time the Autocomplete results is blur()'d, it adds another onblur event observer (because of "Event.observe(this.update, "blur", this.onBlur.bindAsEventListener(this),true); // make sure blur is still around on") which leads to a performance problem / memory leak. (Commenting it out seems to fix this problem.) I was wondering why it was there? Thanks again,
2006 Feb 14
1
Firefox java script error in prototype.js
Hi, I am usign two selects, a master and a slave: <%= select("master", "id", @master) %> <div id="slave_id_list"> <%= select("slave", "id", @slave) %> </div> <%= observe_field("master[id]", :frequency => 0.25, :update => "slave_id_list", :url => {:action => :update_slave_select},
2006 Jul 21
4
observe_field submit behavior
I am using observe_field on a number of multi-selects and checkbox form elements whose values would normally come in as arrays on a normal (non-Ajax) form post. I understand that by using the :with => ''name'' I will get name=value in the request.raw_post however if the field I am submitting has mutliple values and the name is of the form ''name[]'', I get
2008 Sep 15
2
Passing an array into controller
I am trying to pass and array from an AJAX Javascript function to a controller. The parameter is being read as a single string and not an array. The Javascript function: function sendtolist(formName){ var form = $(formName) var checked = [] checked = form.getInputs("checkbox","plans[]").findAll(function(item) { return item.checked; }).pluck("value");
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
2007 Oct 08
1
onblur to work with select
I need a method to be called upon an ''onblur'' event when a select list is no longer the focus - ideally, I would like it to work when the ''Enter'' key is hit. But, I am just trying to get the onblur to work, here is what I got: <%= select( "airlinemembership", "membership", Airline.find( :all, :order =>
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
I made a pretty lengthy post on what I''m doing here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/89a2b8e54a874dd9 Short version: I have a radio_button group of two. If one is clicked another pair of radio buttons is added, if the other is clicked it is removed. observe_form does not work for elements added after initial page load. observe_field does not work
2006 Apr 06
4
problem with IE
hello there, im having a little problem with Internet Exploiter, im doing this: //// CODE //// var m = $(''XYZ'').cloneNode(false) m.setAttribute(''id'', ''XYZ_2''); m.value = ''''; var onblur = "alert(''hola'');"; m.setAttribute(''onblur'', onblur);
2006 Feb 03
3
overloading dragdrop.js
Hi everybody- First time poster, please be gentle. I have written a little rails app where you can create divs and move them around via Thomas'' wonderful dragdrop.js. I would like to be able to fire an AJAX event to update the top and left of the dragged object upon release. I see many AJAX link_to_remote and observe_field. What is the proper way to observe that the position (not
2006 Aug 04
2
observe_field for radio_button
Hi, I need to observe a set of radio buttons but am having great trouble. My observe_field looks like this: <%= observe_field :user_select, :frequency => 0, :url => { :action => :admin_control } %> Now it works fine if I use a text_field like this: <%= text_field :user, :select, "size" => 20, "maxlength" => 16 %> But I want a radio button, and
2006 May 23
1
Help with observe_field
Folks, When I use observe_field, I get a javascript error "Form is not defined". Any thoughts? __View: search.rhtml__ <label for="search">Search:</label> <%= text_field_tag :search %> <%= observe_field(:search, :frequency => 0.25, :update => :search_hits, :url => { :action =>
2006 Jul 26
0
Ajax and onsubmit
I''ve worked through the depot app and would like to use the ajax submit ability, but call it from a textbox''s onblur event. By using onblur I can submit the form, but the ''onsubmit'' part isn''t fired. Is there a way to either fire the onsubmit event, or to copy that code into a text_field? I tried a direct copy from the source of the form just to
2006 May 12
0
RJS, Safari, Error - DOM exception 7
I''m having nasty cross-browser headache. Not new to Rails, but quite new to AJAX/RJS. My app works perfectly in Firefox, but generates the error in the subject line in Safari. Pretty simple circumstance, completely reproducible in all cases: Any ideas? Relevant code attached. Layout: ------- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC
2009 Nov 26
15
bad move? - complex form with *many* observe_field's
I have a pretty complex form with many text fields and a number of selects. We let the user add multiple types of associated objects to the parent object and to edit the values for those associated objs, so the form can have something like the following number of fields on the page: 9 text fields + 3 selects + a*(1 text + 1 select) + b*(1 text + 1 select) + c*(1 text + 1 select) + d*(1 text +