similar to: AJAX and radio buttons

Displaying 20 results from an estimated 2000 matches similar to: "AJAX and radio buttons"

2006 Aug 01
3
Radio buttons and AJAX
Hi, Here is what I would like: 2 radio buttons: "yes" and "no" There will be 2 containers: <div id="yes" style="display: none;">Yes stuff</div> <div id="no" style="display: none;">No stuff</div> What I want is whenever the "yes" radio button is selected, on the "yes" div should be made
2006 Aug 10
7
Radio Button events
Hi, I have observers for a group of radio buttons, an observe_field for each radio button (I think its not possible to have one observe_field for a group of radio buttons). Now, the problem is that when I click on one radio button, all the observers get trigerred, so the method which the observe_field calls gets the wrong result. I just want that method to get the radio button that is
2012 Jun 30
5
Problems with associations
Hello guys, I have two tables, tasks and projects, and each model I put: Task.rb class Task < ActiveRecord::Base attr_accessible :user_id, :project_id, :name belongs_to :project end Project.rb class Project < ActiveRecord::Base attr_accessible :name, :description has_many :tasks end But when I go to my prompt and I make a SELECT with task, none project is returned.
2008 May 16
3
radio button observe field only triggers once
Hi, If i add field observers to radio button fields they trigger once but then nothing after that. I have multiple fields in a form that i need to know if one of them changes and which spedific field. Below is an example of two foelds i tested and they trigger once with the alert but then nothing after that. I also tried individual observers for each field test_yes and test_no but with the same
2006 Jan 18
5
NOOB Ajax question: handling form input
Hi, I was trying to modify how a standard edit form works so I could use Ajax to truncate a zip code field which became too long as the user is entering the value. The form was generated by the generate scaffold script. The form is filled with default data taken from the current record. I coded the following changes to a field in the _form.rhtml file: <%= text_field
2005 Sep 20
1
radio buttons and event obvsering
Hi, I made a little utility class that turns on a particular div when a radio button is clicked - a RadioButtonDivToggler. As the name hopefully suggests, when a radio button from the same group is clicked, a different div is made visible and the others are hidden. In essence, it toggles on (makes visible) the div associated with the radio button from a group that you clicked. However,
2006 Jan 18
1
Observing radio buttons
I''m having some problems with observe_field on some radio buttons. seems to be calling my action on change rather than on click (i.e. when i click on one button the previously selected button''s action gets called without a value, then the newly clicked button''s action gets called with it value) I tried the :on => ''click'' option to no avail. Any
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 Jul 09
2
setting request.raw_post with rspec-rails
... is there a way to do this? We have some REST-ish POSTs we''d like to spec out. In the controller this gets accessed with request.raw_post.to_s, is there a way to set this with rspec? Thanks as always, Francis
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 18
13
RANDOM
I am pretty much new at this ROR game and had what I think to be a simple question. I have a set of Sponsors that I would like to be able to select one at random and display in the my html. I have already set up the DB, scaffolded, set index controller and all is working smoothly. I know that I can display them all by doing <% for sponsor in @sponsors %> <%= sponsor.name %>
2007 Feb 27
2
Dynamically add radio buttons to forms?
Good afternoon all I''m trying to implement a form that dynamically inserts radio buttons into a form. The user selects options from a drop-down menu. I use observe_field to watch for a change and call back to render the appropriate partial tha contains the radio options. All works nicely but I''m tripped up on one thing: When rendering a form using form_for how do I link those
2006 Jun 26
6
paypal ipn from leetsoft
Has anyone had any luck with the paypal gem from leetsoft (Tobias Luetke)? I''m successfully sending off and making payments, but the ipn doesn''t send back to my site. I have the notify_url set in the form, have a action set for the ipn postbacks, but all I get from my sandbox after payment is a "view shops" page from paypal after payment is made. -- Posted via
2010 Jul 20
4
MySQL index question
I am trying to speed up some DB operations and perhaps have gone overboard with indexes. Does MySQL usually use only one index per query and simply match keys on the results of the indexed first part? For example: DELETE FROM tokens WHERE 6813946236211560448 <= fnv AND fnv < 6818449835838930944 AND updated_at<''2010-06-20 14:08:55'' AND occurrences=0; If I understand
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a couple days and can''t seem to figure out the correct way to structure my observe_field call. The HTML and Javascript generated all appear correct, but the AJAX call is never made. Below is the code I''m using and any help would be much appreciated. models_controller.rb def
2006 Dec 29
4
Remote API passing in parameter named 'action', routing loses it
I''m working with a remote API that calls a URL in my app, passing in a parameter named action. So the request would look like: http://localhost/my_controller?action=foo Routing correctly interprets the controller action as index. However, it sets params[:action] to index as well. I know that''s how it''s supposed to work...but it means I lose the action parameter
2005 Dec 23
2
Bizarre problems with AJAX / missing variables
I''m having some really weird problems with an app I''m writing. Everything is working as expected on my development machine (OSX, Rails 0.14.4) but is cacking out with weird errors on the Textdrive demo site (FreeBSD, Rails 1.0.0). It complains about missing variables, with errors like this: undefined local variable or method `rawcode'' for
2006 Oct 17
1
nil object in live search
Hi,I am trying to implement a small live search thing in typo. the view that I interative with is view/admin/content/_form.rhtml I created a search field when creating an article and use observe_field to observe this search field and tells the content_controller to search in database for the appropriate match. But when I tried to type a letter in the search field, I''ve got the
2006 Jun 30
7
javascript woes with radio button groups
Ok! So I have this survey project I''m working on where there are a list of questions but only one shows up at a time. That part''s easy. And, it is fully functional as we speak (and I think even ''live'') however..... My boss wants to be able to have the survey go to the next question when a user selects an answer. This part is easy.. except..... IE
2010 Oct 19
0
Ajax & Table Display Filtering based on Selected Option
My scenario: On a department''s products page (index.js.rjs), there is a table showing the products with their id, name, category. The view of this table is specified by a partial file called _index.html.erb. I''m going to add in a selection/option drop down menu above the table to show all the product categories. When the user selects a category from the drop down menu, Ajax