Displaying 20 results from an estimated 4000 matches similar to: "Observing radio buttons"
2006 Jun 28
3
observe_field and radio button... does not work?
I try to catch click event on radio button, but nothing is executed....
Tested with RoR 1.1.2 and 1.1.3. What am I doing wrong?
<%= radio_button_tag(:city, ''Dublin'') %>
<%= observe_field(:citi, :frequency => 0.5,
:on => ''click'',
:with => "''city='' +
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
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 Jul 26
1
my "observer" is blind
Any body have an idea why my first attempt to use "observe_field" isn''t
working?
<%= start_form_tag(:name => ''my_form'', :controller => ''boo'' , :action =>
''ya'') %>
<%= radio_button_tag(''foo'', ''true'', checked = true) %>
<%= radio_button_tag(''foo'',
2006 May 09
6
RJS, & mulitple Drop Down Boxes.
Hello Again Rails Folk!
I''m trying to creat a page similar to what the person is doing here...
http://mudabone.com/aietc/?page_id=410
Instead of doing it the way he/she has, I decided to use RJS files, or
at least I tried.
Here''s my view
<%= start_form_tag %>
<%= javascript_include_tag "prototype" %>
<p>
Union:
<div id="union">
2006 Aug 07
2
Select Box Question
Hi,
Yet another newbie here... I''m writing an appliction in Rails, and I''ve
Ajaxified my select boxes so they update dynamically. I used the
"observe_field" method to monitor changes to my select box. I find that
it''s kind of erratic... it updates constantly and makes the selection
for me, based on where my mouse happens to be hovering when it does its
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 +
2006 Apr 28
2
Calling Javascript function using observe_field
I''m trying to call a simple javascript function from within an
observe_field. It is possible to replace the :url with :function to
call a function. But since there are no examples, and I''ve tried a
bunch of iterations, can someone show me sample syntax?
I''d like to do something like:
<%= observe_field :FormOptions1,
:frequency => 0.25,
2006 Jul 11
9
problems with observe_field
Hi all, I''m having problems with an observe_field, this is the view:
<%= form_tag %>
<div id="content">
<p>Customer:
<select name="cliente_id" id="cliente_id">
<option value="">Select a customer</option>
<%= options_for_select Cliente.find_all.collect {|c| [c.razon_social,
c.id]} %>
2008 Sep 04
3
Can you use observe_field to watch a select list and then update the contents of a text field?
Before I waste more time trying to figure that out, I was wondering if
it''s even possible? The Rails Way says that observe_field by default
will trigger changes in text fields and text areas, and on clicks for
radio buttons and check boxes. So perhaps I''m using the wrong tool
here? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2006 Jul 12
2
Can''t get observe_field to take a variable for a field name
The subject pretty much says it all: I can''t?get observe_field to take a
variable for a field name
I''ve tried:
<%= observe_field(var_name, ...
<%= observe_field("#{var_name}", ...
<%= observe_field(:"#{var_name}", ...
No luck.
Am I missing something?
Thanks,
: )
Jason
--
Posted via http://www.ruby-forum.com/.
2008 May 30
4
How to deal with observe_field in partials?
Hiyas
I''m having a little problem with a observe_field in a partial
"bokings/room_list":
<%= select_tag "room_#{room.id}_grownups", options_for_select([0, 1, 2],
room.grownups.length) %>
<%= observe_field "room_#{room.id}_grownups",
:url => set_number_of_grownups_booking_room_url(:id => room.id),
:with =>
2006 Feb 17
1
AJAX and radio buttons
Hi!
How can i use ajax with radio buttons?
I have form with 2 radio buttons, which updates div with the value of
selected radio button. It worked correctly when i used submit button,
but when i removed it and used observers it didn''t. When i press the
first button it displays its value, but when i press the second button
it displays new value for a moment (0.5s ?) and then suddenly
2006 Jun 27
2
Bug in Firebug or in RJS? Or something else?
I''m getting a really strange result using RJS page.replace_html and wonder if anybody knows anything that could help me figure it out.
I''m rendering a partial in a loop in edit.rhtml that puts a set of <div>s on the page, each <div> containing a checkbox_tag with an associated observe_field and a text_field_tag also with an associated observe_field. When the
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
5
RJS in Internet Explorer to update a list box
Hi,
I''m trying some RJS to update a series of list boxes in which the user
selects a state, and the following list gets updated with a list of
counties, and the same for the next list of areas.
My code works perfectly (albeit a bit slow) on Firefox, but on Internet
Explorer it clears the list box (instead of filling it) and Netscape
shows all the counties cramped together on one
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
2006 Aug 16
8
Multiple (AJAX) Observers on the Same Field and MSIE
I have been using multiple observers, i.e., observe_field(), on the same
input field and relying on them to execute in the same order that they
appear in the page. This has been working fine in FireFox, but it does
not seem to work in MSIE; the requests come in and are processed in a
different order. Now, I''ve always been a little hesitant about using
this technique, but it always
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,
2005 Dec 31
4
observe_field with dynamic forms
I have a form where I dynamically add form elements based on user input.
An example is that when a user selects a "server" from a select box I
add (via AJAX calls back to server) a "type" select box pre-populated
with valid choices for that server. I do this by using observe_field on
the "server" field and update a div on the page with the new "type"