Displaying 20 results from an estimated 1200 matches similar to: "How to show div with radio button onclick"
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello:
I have radio buttons like this:
<% fields_for :goalhist do |g| %>
<table>
<tr>
<td align=left><%= radio_button_tag (''duedate'', 0, checked = false,
options = {:onclick => ""}) %>
Start now
</td>
</tr>
<tr id="detailed" style="display: none"><td colspan=2>
2006 Mar 22
2
Radio Button Defailt Value?
I have:
<%= radio_button ''foo'', ''bar_id'', ''1'' %>
<%= radio_button ''foo'', ''bar_id'', ''2'' %>
<%= radio_button ''foo'', ''bar_id'', ''3'' %>
I would like to have option #3 be selected if foo.bar_id is nil. Is
there a way to do
2006 Mar 24
1
Radio Button Tag and hash @Params.
Hi,
I''ve a little problem using the Radio Button Tag.
I use the " @prove=MODEL.column_names() " to keep attribute names of a
table. After
i used this code to select a attribute subsets of them :
<% i=''0''%>
<% for @obj in @prove %>
<% @key='':key''+i%>
<%= radio_button_tag (@key,@obj) %>
<%
2008 Jul 21
0
edit radio button values...
my problem is... during edit process radio button should be checked as
default ..how can i do that ..pl help..
my edit .erb file
<% form_tag (:action => ''update'', :id => @mobile )do%>
<p><label for="book_title">Title</label>:
<%= radio_button ''mobile'', ''brand'', ''yes'' :checked =>
2007 Aug 04
0
capturing radio button values for nested object
I have a user object and an account object. User has one account
object. In the signup.rhtml I have a radio button that has three
options for the membership (yearly, monthly and sample). How do I
populate the account model when the user submits the form?
Is the following syntax correct?
<%= radio_button("user[account]", "membership", "Yearly") %>
2012 Feb 29
0
controller code for access to params in radio button column
I am new to Rails, and I thought I understood params, but I''m a little
fuzzy on what goes into the controller to access a third value for a
radio button. In my migration I defined the column as a string with a
default value of nil.
The column itself is actually a question(no question mark appears in the
column though)with three choices in the radio button form: yes, no, and
undecided.
2008 May 07
1
Change Focus of Radio Button
Hey ya''ll... Love learning Prototype so far... ran into a small
problem today, from my google search it doesn''t seem like there is an
easy way to do this... i hope i have assumed wrong!
I need to change the focus of a radio button... I currently use this
code to call focus to the first form element... i tried to reuse it to
do radio buttons with no success
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='' +
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 Mar 17
5
Radio Button Validation
I''m writing a quiz application and I need to validate the radio button
reponses. I do not have the questions in a database, I just have forms
which contain "question1" and then I strip out the "question" portion
and just insert the number as the question''s id. So now I''m faced with
the dilemma of making sure the radio buttons are pressed.
Radio
2013 Jun 18
1
How to Pass Jquery selected dropdown values and radio button values to controller
Hi,
I have an advance search page and its code is as follows -
I have written my code like this
<div class="container">
<%= form_tag search_index_path, method: :get do %>
<%= radio_button_tag ''user_type'', ''customer'' %><p>Customer</p>
<%= radio_button_tag ''user_type'',
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
2013 Mar 02
3
Help Radio button
Hi i''m fairly new to ruby on rails and i''m creating a form using
simple_form and in one bit i have radio buttons and say i have 3 buttons
a,b,c so i want it to be if a is pressed then certain text fields show, and
if b is pressed a different set of text fields show and similarly for c.
Can anyone help me on this?
--
You received this message because you are subscribed to
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
2006 Mar 10
0
Multiple radio buttons for defining multiple objects?
Hi, I''ve been working on a multiple choice Question/Answer system. The
response object (analagous to a lineitem) has a question_id, user_id,
and the actual response. What''s a good way of making a form with
multiple response objects which are created from the radio_button
helper?
Right now I''ve got the following code:
2006 Apr 27
0
radio buttons and $F function
Hello there, i working with prototype but i have a little doubt, I''ll always
use the shortcut $F to get values in a form, that''s ok, but what happens if
i need get the value of one of three radio buttons value? normally i get
the radio button value with document.formName.radioName but the shortcuts on
prototype works with the id, there is a prototype way to do this??
greets
--
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 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
2009 Apr 15
0
Multiple CheckBox and Radio Buttons
I am using multiple check box (more than 1 checkboxes) and a radio
button and when I click the "Submit" button, it calls the "create"
method it is inserting only 1 value for checkbox and also for the radio
button.
Could you please tell how to insert multiple check box values in create.
Also, in the scaffold edit page, the default "edit" method displays
all
2009 Apr 28
0
Radio buttons in forms
<% form_for @group do |g| %>
To create a new group please complete the details below
<p>
<label> Group Name </label>
<%= g.text_field :name %>
</p>
<p>
<label> Public </label>
<%= g.radio_button :type, "public" %>
<label> Private </label>
<%=