Show / Hide A Div When A Radio Is / Isn't Selected

Oct 16, 2009

I am new to this kind of scripting, so I have not done it before, I have tried to find solutions on the net but none have worked. I have a 'contact us' form, which includes 2 radio buttons to select how they wish to recieve their reply... the first radio is 'email' the second radio is 'phone' When the 'phone' radio is selected, i want the div including a drop downbox to appear to ask what time to recieve a call, but when the 'email' radio is selected, this div does not appear. This is the script for this section.

[Code]...

View 2 Replies


ADVERTISEMENT

Show/Hide A Div When A Radio Is/isnt Selected?

Oct 16, 2009

I am new to this kind of scripting, so I have not done it before, I have tried to find solutions on the net but none have worked.I have a 'contact us' form, which includes 2 radio buttons to select how they wish to recieve their reply... the first radio is 'email' the second radio is 'phone'When the 'phone' radio is selected, i want the div including a drop downbox to appear to ask what time to recieve a call, but when the 'email' radio is selected, this div does not appear.This is the script for this section.

<span>Best way to reply:</span>
<input type="radio" name="reply" value="Email" id="reply_0" /> E-mail <BR />
<div style="margin-left:270px;"><input type="radio" name="reply" value="Phone" id="reply_1"

[code]....

View 3 Replies View Related

JQuery :: Hide/Show Based On Radio Button Selected?

Sep 14, 2009

I am trying to create a script that will display content based on if aradio button is selected, and if the other is selected would hide thecontent. Now, each of these radio buttons are part of a radio group,so their names are the same. Most examples show nput:radio[@name=item] Since I have 2 items that have the same name, I can't usename, so I thought I would try id or value. It isn't working. If I addonly the show, whenever you select either radio button, it shows, andif I add the hide code, it doesn't work at allHere is what I have right now.

$(document).ready(function(){
$('#offices_checkboxes').hide();
$("input:radio[@value=1]").click(function() {

[code]....

View 2 Replies View Related

Show / Hide Div Layer / Change Link Color / When Radio Button Is Selected

Aug 16, 2010

I am trying to develop an exam system.Find my code below.I request you to copy the code and save it as an html file .I have 2 problems:

1. Kindly notice that when the quiz is loaded,it shows both the questions by default.I want only question 1 to be visible when the quiz loads.What happens presently is that ,both questions are visible even after I click on the link
Q.1( referring to question 1).However,when I click on
Q. 2,then only question 2 can be seen and then(after clicking on Q.2) if I click on Q.1,then only question 1 can be seen

What I want is that when the page loads only question 1 is visible.Then when I click on Q.2,I can see only question 2 and when I click on Q.1, I can see only question 1.I later plan on adding many questions,so it should be a general solution rather than a solution good only for 2 questions.

2.Also,what I want is that,if someone selects any of the answers of a particular question,it's link color should turn green to indicate to the user that he answered that question.So for,instance,if I select an answer to the first question(select one of London,New York,Seattle,Washington,Chicago), the link Q.1 should turn green.

View 3 Replies View Related

Show Div When 3 Radio Buttons Are Selected

Oct 4, 2010

show a div when 3 "Yes" radio buttons are clicked. Heres my code:

[Code]....

If you answered YES to 3 or more of the above questions you may have Sleep Apnea - a potentially serious breathing disorder that can lead to heart attack, stroke, or high blood pressure in later life.

View 2 Replies View Related

Radio Button Is Selected Then Show Text Box?

Mar 9, 2011

I have a long list of events and I want somebody to be able to select one of those events & there will be a text box that shows the address pertaining to the event selected. Exactly how this website did here: http://svacpa.com/live-webinars-and-roundtables-with-demo/seminar-registration/

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

[code]....

View 9 Replies View Related

Show New Field When Radio Button Is Selected

May 26, 2006

I have a pair of radio buttons (yes and no) as answers to a question. When the yes radio button is selected, I need a text field to be displayed underneath it. Does anyone know how to do this?

View 2 Replies View Related

Show Price In Field When Radio Button Or Checkbox Selected

Jun 19, 2009

I am working on a registration form for a conference. The form has several sections of radio buttons and checkboxes and I would like to have it set up so that if a radio button or checkbox is selected the price related to that selection shows up in the rigjt column of the form and can then be totaled up at the bottom of the page.
1. Show price in field.
2. Total up all of the prices at the bottom of the page.
You can view the registration form at: [URL]

View 9 Replies View Related

Show And Hide Radio Button?

Sep 17, 2010

I have to 2 radio buttons and two hidden divs. How would I be able to show and hide them depending on the selection I've chosen?

View 4 Replies View Related

JQuery :: Show / Hide DIV Based On Selected Value Of Tag

May 29, 2010

I have a simple jQuery code that shows or hides a DIV based on the selected value of a select tag. Currently it looks like this and it's working fine:
if (selected == "0") jQuery("#divPublishDate").show('slow')
I want to add an else so that the if the value is anything other than 0, I want to hide the div. What's the proper syntax in this case? I assume this is the short version of an IF statement without the { }.

View 2 Replies View Related

JQuery :: Show Only The Selected Tr And Hide The Rest?

Oct 28, 2011

I have table in which i want to show only the selected tr and hide the rest.

<tr class="t">
<td class="oppCol cell" id=465>465
</td>
</tr>

[Code].....

View 2 Replies View Related

Hide / Show Div By Dropdown Option Selected

Apr 24, 2010

ive been racking my brain looking for a code solution for this....im a html and css pro....and a javascript heres what im tryna do....i have a form...that has a <option> in it for 6 dropdown options.... in one of those possible options.. when SELECTED...i want the div layer that i currently have under it...to appear and i cant seem to figure it out....heres my code in its entirety i want budget div...to appear when the option website design is selected

[Code]....

View 2 Replies View Related

Toggling Hide/Show On Radio Selection?

Aug 15, 2011

I have a calculator that I want users to be able to select a radio option that will display the coresponding calculator and hide it when the other radio button is selected in other words I want to only have one visible div at a time. How would I do this?

Here is my Javascript:

HTML Code:
<html>
<head>
<script type="text/javascript">

[Code]....

View 2 Replies View Related

Show/Hide Checkboxes With Radio Buttons?

Feb 10, 2011

I'd like to ask a user to choose from one of two radio buttons. The first radio button will show three checkboxes. The second radio button does nothing.How do I do this?

View 9 Replies View Related

Very Basic Show/hide Div With Radio Button?

Apr 2, 2009

i have made this request as simple as possible.When my page loads I would like div1 and div2 to both be hidden

If user clicks Div 1 radio then
div1 = visible
div2 = hidden

[code].....

View 3 Replies View Related

SHow / Hide Elements Based On Selected Option

Nov 13, 2010

I've tried to find a stright forward script which show/hide specific form fields based on a selected option. I've seen many online but non of them was working with me without the need of some coding or tweeks. Does anyone here have such script?

View 4 Replies View Related

Show/Hide Buttons Based On Radio Selection

Jul 20, 2005

I have a form with three radio options. And I have three buttons:

<input type="submit" name="mainform_action" value="Edit Data">
<input type="submit" name="mainform_action" value="View Data">
<input type="submit" name="mainform_action" value="Delete Data">

If the first radio button is selected, I only want all three buttons to be
visible to the user.

If the second radio button is selected, I only want the "Edit Data" and "View
Data" buttons to be visible.

If the third radio button is selected, I only want the "View Data" button to be
visible.

Is it possible to accomplish this in Javascript? In particular, I want to
continue using the "input type=submit" buttons without having to create my own.

View 3 Replies View Related

JQuery :: Show/hide On Radio Button Click

Aug 4, 2009

I'm trying to do a show/hide on a radio button click and I do have it working, but I'd like to make it more...extensible/independent of hard- coding children elements to show hide.

My dummy html structure is:

I left some commented out stuff at the top of the function, hopefully to give you an idea of what I tried.

In particular:

I was trying to get the first ul (the children to show/hide) on "this" (the radio button clicked). I'd like this to be flexible to where you could add more radio button/children and as long as the structure stays the same, the show/hide functionality works.

View 2 Replies View Related

Unable To Show Hide On Radio Buttons / Enable This?

Nov 9, 2009

I have a issue - I'm hiding and showing div's when the radio is clicked but currently you have to click twice for the div to show - what am i doing wrong?[code]...

View 9 Replies View Related

Show - Hide Div Based On Radio Selection - Prototype

Apr 27, 2010

I have 3 divs that contain radio with labels and beneath each radio button I would like to show/hide a form based on whether the radio is selected or not.

Code idea:

So if the radio1 input is selected this would show form1. Selecting radio2 input would hide any other forms (form1, form3) and show form 2 etc.

View 1 Replies View Related

Hide/Show Text Field On Radio Select

Aug 10, 2006

I'm a *real* JS noob and need to show or hide a text field when a radio is selected. This is what I've tried so far. Code:

View 3 Replies View Related

Show/hide Div Based On Radio Button Select

Jul 12, 2007

i would like to have 2 radio buttons each with a associated div when the page loads the first radio button will be checked and its corresponding div will be show when the user checks the other radio button its corresponding div is shown and the first div is hidden:

View 2 Replies View Related

Show / Hide Divs Based On Radio Input

Mar 25, 2010

I'm having some issues with showing / hiding divs in a form based on radio button input. I'm fairly new to JavaScript so I'm still not 100% on what I'm doing... I have a pretty extensive form with quite a few container divs that are set initially to "display: none" and I need them to be set to "display:block" dependent on radio button input.

For this piece, I need the div with id "SFSCPROJSPONCOMP" to be displayed when the user selects the Radio button with name "PROJSPON" and value "COMP".If someone could provide me with JS code for that example, I can get through the rest of this form with ease.

View 2 Replies View Related

Jquery :: Hide / Show Div Based On Radio Class?

Apr 18, 2010

what i have are 3 radio buttons at top of my form, the first radio option i would like if selected to open a div that contains new questions on the form... then if the other radio buttons are selected they hide that div.

View 1 Replies View Related

Get My Form To Show And Hide Various Divs With Radio Buttons?

Oct 26, 2010

I'm trying to get my form to show and hide various divs with radio buttons. There are multiple options in the second box of my example. When a user selects the first option, more input boxes come up. Perfect, that's what I want. However, if they decide they didn't mean to click that option and instead wanted another option, the original part that popped up doesn't disappear. I cannot figure out how to make this happen.

View 6 Replies View Related

JQuery :: Show / Hide A <div> When Changing The Selection Of A Radio Button?

Mar 2, 2010

I want that a <div> element will show when yes is selected and when no it should be hidden. For show and hind i will use the functions from the jQuery UI. But I don't find a way to call the hide / show function when the selection change.

The radio selection: <input type="radio" name="lang_anz" value="1"> Yes<br> <input type="radio" name="lang_anz" value="0" checked="checked"> No<br> When I understand the documentation I can request the current value from the radio with: <script type="javascript"> $('input:radio[name=lang_anz]:checked').val(); </script>But how i can now call the show / hide function when I change the selection?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved