similar to: Any way to add ''onchange'' to a ''select'' helper?

Displaying 20 results from an estimated 20000 matches similar to: "Any way to add ''onchange'' to a ''select'' helper?"

2006 Feb 10
0
AJAX update for select list onchange?
Hi Rails Users, I have a select list that I''d like to use to update a div onchange. Right now I just have the div appear, but not update: <%= select_tag( "profiles_select", option_tags = @profiles, { :onchange => "new Effect.Appear(''the_profile'', { duration: 0.5 } );"
2006 Jun 14
4
Select box onchange problem
Hi, i''ve got the following problem. I have a check_box witch shows a list of varieties. Now i want to call a action when the user changes his selection. (the method to be called, will store the selection from the user). This is my code: <%= select(''variety'', ''variety_id'', Variety.find_all.collect {|c| [c.description, c.id]},
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2009 Jan 28
1
How to give onchange for select_year rails helper....
<%=select_year(Date.today,:include_blank=>true, :start_year => Date.today.strftime("%Y").to_i, :end_year => 1999)%> i am using rhis helper... now i want to give onchange here.... Please help me to solve this .... thanks in advance JK -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because
2006 Mar 28
0
using ''onchange'' option in select from a partial to update a
I''m new to Rails and don''t totally understand some of the control behavior of ActionController. Here''s my problem: I have a _header.rhtml partial view that is supposed to be the header (naturally) on a main.rhtml view (i.e., main.rhtml calls the header partial via the render method). In the header view is a select field that I''d like to have refresh the
2006 Jan 19
0
Autocomplete field - onChange immediately after selection
Dear all, How can I trigger onChange event after a choice is selected and put to a field? Now this event is triggered as usual after exit from field (with tab or mouse) but it would be nice to do some custom onChange action immediately. Thanks! Janko
2008 May 05
1
Passing values selected with onchange remote_function
How do i pass the value selected from a drop down selection and then extract it in rjs <% select("what", "hello", @selection, {}, {:onchange => remote_function(:url => "test", :my_variable => "hello again") } ) %> thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2005 Jul 25
0
Code for onChange is missing
Hello, onChange as advertised for Sortable cannot work, as there is code missing. // onChange event handler element.sortable = {}; element.sortable.onChange = options.onChange; needs to be added to Sortable.create() to make it work. Bye, Martin
2006 Oct 28
2
onchange="document.forms[0].submit()" - how to CANCEL
Goal: I want to auto-send a form whenever any field changes. The page will be updated "via Ajax", so standard submission is cancelled. Idea: Add onchange="document.forms[0].submit();" to every field Problem: Can not cancel form submission. Browser redirects to "results" page, which is of course JavaScript meant to dynamically update the page. RHTML snippet:
2006 Mar 24
2
Slider: passing the slider object to onChange and onSlide?
I''m working with a couple of slider objects on one page. I''m using onChange to do a couple of things. onChange passes the new value of the slider, but not the slider object itself. Has anybody found a way to get the object? More details: A simple example would be to do the following: Put multiple sliders on a page. Now, when a slider is moved, change it''s track
2006 Jun 05
1
:onChange and AJAX forms
Hi, I have this: <%= form_remote_tag (:update => "item_type_list", :url => {:action => :list_item_type_for_brand}, :id => "form1") %> <div> Brand <%= select :current_brand, :id, @all_brands,{},{:onchange => "submit()"} %> <input type="submit" value="Change" /> </div> <%=
2006 Jul 14
0
datetime_select and onchange?
Is it possible to add an onchange handler to a datetime_select call? I realize the complication exists in that the helper actually creates many different select elements, but rails could just spread the onchange across all of them. -Payton
2006 Jun 21
0
Ajax.Autocompleter and onchange event
Hello, currently I''m working on a JavaScript-on-screen-keyboard for use with touch screens. To autocomplete inputs I want to use the Ajax.Autocompleter control. The problem is that Ajax.Autocompleter only responds to onkeypress events made with a real keyboard, but my on-screen-keyboard causes onchange events when a letter is clicked and appended to the input field. So, is there a way to
2010 Jan 23
0
Problems with :onchange for radio_button_tag
Greetings, I''ve been hitting my head to the wall over this for quite a while now and don''t seem to be able to wrap my forementioned head around it. Basically I have a list of users in a selection box and I have two radio buttons: Sort by first name and sort by last name. This is what I have in my view: <%= radio_button_tag ''sort_by_last_name'',
2008 May 06
2
onchange error - InvalidAuthenticityToken
VIEW: <select id="hello" name="me" onchange ="new Ajax.Request(''.......'')> <option value = "344" selected="selected></option> Can you enclosed this onchange here dynamically? the Ajax.Request i post come back with an InvalidAuthenticityToken error. I don''t know where to strart on resolving that so I am
2006 Apr 14
0
Updating a select the correct way?
I have two <select> objects. The first one (let''s use the standard example of artists/albums here) is pre-loaded from the page but I want the second one to load when the user changes the value in the first form. Before RoR I would just do this with the onChange handler of the <select> object. The onChange would fire off a javascript function that would use the results of a
2006 Mar 29
4
using onchange options in forms
Hello, I''m trying to get a select field to update a view via the ''onchange'' option. I''ve seen examples of it here in the forum where people hardcode the forms and use javascript to trigger the change (and nearly all have complained that it''s a hack) and I''m wondering if anyone has a more elegant solution using the embedded ruby methods?
2008 Dec 15
1
remote_function in IE with select input onchange
Here is the code: http://pastie.org/339967 Generated HTML: http://pastie.org/339969 This works great in Gecko and Webkit based browsers, but IE throws an error: "Object doesn''t support this property or method". Any clues? Thanks, Nik --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2011 Aug 29
7
:onchange in rails 3
Hi, Anybody know why :onchange works here... <%= select_tag "Minisections", options_from_collection_for_select(@minisections, :id, :title, :selected => @minisection.id), {:onChange => "{alert(''Minisection has been changed to x !'')}"} %> but NOT here (to call a function)... <script type="text/javascript"> function xyz() {
2007 May 25
2
Sortable onChange fires for every mouse movement
Anyone found that sometime between 1.6.4 and 1.7.1 beta releases of Scriptaculous that something has changed with the way that the onChange is fired? In 1.6.4 it fired once, now in 1.7.1 beta it fires everytime you move the mouse. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs"