JQuery :: Pass Radio Button Selection To Hidden Div And Then Show Div List From Chosen Radio Button?

Mar 16, 2010

I am a PHP programmer and new to Javascript and jQuery and I have tried about 20 examples/tutorials and cannot seem to get even close to what I want.I have a form (PHP/MySQL) with a list of subjects I got from my database, and then create a set of radio buttons from that list. And based on what radio button they select, I need to pass that variable to a div (at least that's what I want to use) and then show a list of videos that match the radio buttons value. I don't care if its a get or post or other.I tried to use GET or POST so I can use that value for my PHP/MySQL lists.I am open to any suggestions/tutorials, etc.

View 1 Replies


ADVERTISEMENT

Show Dynamic List With PHP Using A Radio Button Selection

Mar 15, 2010

I have a form with a list of subjects (radio buttons) that I get from my database with PHP, and I want to show a list of videos (also from my video table using PHP), based on which subject they choose.

I have tried multiple POST, GET methods with JavaScript examples, but cannot get it to work. I am not having any issues with the PHP getting either list, it is just getting the radio buttons to pass either the POST or GET data to JavaScript, and have it take that value so I can get the list from my database with PHP. I tried to use a div for the list of videos, and didn't have much success.

View 6 Replies View Related

JQuery :: Pass Radio Button Value To Hidden Text Field

Mar 10, 2011

I found the following code to get the value of a radio button (radio1 is the name of both the yes and no radio buttons):

How do I pass this value to a hidden text field?

View 2 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

Show / Hide Form Fields Depending On Radio Button Selection

May 29, 2005

How to show and hide form fields depending on a selected radio button.

View 14 Replies View Related

Passing Form Value - Display The Value Of The Chosen Radio Button On A Text Input

May 11, 2010

I wrote this form to try to display the value of the chosen radio button on a text input.

<form>
Choose one choice...
<input type="radio" name="group1" value="5">Five<br>
<input type="radio" name="group1" value="10">Ten<br>
<input type="button" value="Get Result!" onClick="T1.value=group1.value"><br>
[Code]...

How come the onClick="T1.value=group1.value" results in undefined instead of 5 (or 10) ?

View 1 Replies View Related

JQuery :: Possible To Select A Hidden Radio Button?

Jan 23, 2010

Ran into an issue today I wasn't able to sort out on my own or through a Google search:I have this form where I wanted to select a radio button when the containing div was clicked. So, on the click of the div, I would say that the radio's attribute of checked was set to checked.It all worked fine until I put on the document.ready to hide all the radios.Thus, with a hidden radio input, I was unable to manipulate the checked attribute. Did I miss something? Example code for reference:

$(document).ready(function(){
$("input[type=radio]").hide();
$("form div").click(function(){

[code]....

View 1 Replies View Related

Link To Reflect Radio Button Selection?

Jun 27, 2010

I am trying to get a css-styled button to stay on its 'roll-over' state once it has been selected by its corresponding radio button (connected via the label tag). So far, I have no idea what I'm doing.

Here's what I have so far: [URL]

This is what it's doing: [URL]

This is what I'd like it to do: [URL]

Any experts out there that can lend a hand ?

View 3 Replies View Related

Form Action Url Selection On Radio Button Value

Jul 5, 2005

I have 2 radio button first is a and second is b.

If a is selected then the form action should be a.php or b is selected then b.php.

Any idea how to do this. I don't want to this in server side script.

View 3 Replies View Related

Swap Image On Radio Button Selection

May 23, 2010

I load a page with two default images and two radio buttons not selected. When either of the radio buttons gets checked I need to swap corresponding image. I tried this but it does not seem to work:

PHP Code:
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">

function swapImage(currencyflag) {
switch (aspectflag) {
case "3x2":
3:2.src = "/i/misc/aspect3x2_rd.png";
16:9.src = "/i/misc/aspect16:9_gr.png";
case "16:9":
3:2.src = "/i/misc/aspect3x2_gr.png";
16:9.src = "/i/misc/aspect16:9_rd.png";
}}
</script>
</head>

<body>
<img src="/i/aspect3x2_gr.png" width="150" height="100" alt="" name="2x3">
<img src="/i/aspect16x9_gr.png" width="178" height="100" alt="" name="16x9">

<form>
<input type="Radio" name="aspect" id="3x2" onclick="swapImage(3x2)">
<input type="Radio" name="aspect" id="16x9" onclick="swapImage(16x9)">

</form>
</body>
</html>

View 2 Replies View Related

JQuery :: Pass The Name Of A Radio Button Set That Supplied An Answer To A Rails 3 Controller?

May 9, 2011

How can i pass the name of a radio button set that supplied an answer to a Rails 3 controller?view:

<%
[
1

[code]....

View 1 Replies View Related

Does A Disabled Radio Button Pass A Value

Nov 14, 2010

I have a form that disables the radio options after choosing one and pressing a confirm selection button. Does the disabled attribute affect the value submitted?

View 2 Replies View Related

Populate Textarea Based On Radio Button Selection?

Aug 24, 2010

how to get contents into a textarea based on a radio button selection.

Code:
<script>
text = new Array()
text[0] = Array('Saab','Volvo','BMW');
text[1] = 'second list';

[Code]....

View 3 Replies View Related

Pass Selected Radio Button Value From Js To Script?

Sep 20, 2010

I have two radio button yes,no in a.jsp.
var IncludeCharges = document.getElementById("IncludeCharges_no").value;

If i select yes i need to pass 1 to the java file and in case of no i need to pass 0. but when i retrive the radio button value using code...

It shows undefined...

How could i get the value

View 1 Replies View Related

Fields In Form Hidden Until Radio Button Is Checked?

Sep 14, 2010

I am pretty new at javascript and I am trying to create a payment form that has both fields for payment by check and payment by credit card.I am wondering how I would go about having a radio button that asks the user how they would like to pay "credit card" or "check" and depending on which one they pick it shows the fields pertaining to that type of payment.the fields in the form look like this:Credit Card Fields:

<select name="card_type" size="1">
<option value="">- Card Type - </option>
<option value="1">Visa</option>

[code]....

View 4 Replies View Related

JQuery :: ASP Radio Button List - Partial Page Update?

Nov 4, 2010

ery new to Jquery but really like what I'm seeing. Really improves the interface. Is this possible to achieve? Partial Page Update Without Having To Do An ASP Auto Post Back on a ASP control. I have <div id="documents"> An <asp:RadioButtonList id="selector" Class="tablecell"> When its checked, can I refresh the documents div only rather than the full page?

View 1 Replies View Related

List Out A Radio Button Then Get The Value From It

Sep 29, 2011

I am simply trying to list out a radiobutton then get the value from it, but for some reason it is NOT working... I loop through an array and make the radiobuttons in a list (these are displayed in a shadowbox).

[Code]...

View 1 Replies View Related

Jquery :: Radio Buttons And Submit - Selected Radio Button's Value To Be Inserted Into The Href Of The Link??

Jan 20, 2011

I have 3 radio buttons with the same name ("myradio"). The value of each is a different URL (eg. value="http:[url]...)I have a link underneath these (<a href="#">Send</a>). I would like the selected radio button's value to be inserted into the href of the link, and if the user selects a different radio button that this changes.

View 1 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

JQuery :: Processing The Radio Button To Show Different Data?

May 10, 2011

I have a problem with processing the radio button to show different data.

[Code]...

View 5 Replies View Related

Radio Buton Hover Css - Background Color Only Draws A Box Around The Radio Button But Does Not The Actual Radio Color

Mar 24, 2010

l need to apply a hover css on a radio button. Currently the background color only draws a box around the radio button but does not the actual radio color. l dont mind if there is no css even javascript will do

View 1 Replies View Related

Display Results Based On Radio Button Selection Without Browser Refresh

Apr 27, 2011

I am very inexperienced with javasciprt. I am designing a form in coldfusion, and want some dynamic action to take place. My users will be offered 2 selections via radio buttons. Depending on which radio button they select, they will get a few more radio buttons to choose from. I have been told that this can be handled in javascript. So I am appealing to the javascript programmer nation for some assistance in this endeavor.

View 6 Replies View Related

Inline Script Code To Check A Hidden Radio Button?

Jul 14, 2010

I'm looking for a quick example of how to make a "word" have an onclick event that sets the value of a hidden radio button to true.

I've search for inline examples but couldn't find one online.

This is the code I have but it is not working. You should see I was trying to make the + and - signs trigger setting a radio button to true, which then triggers a sql search. code...

View 6 Replies View Related

Clicking Radio Button Selects A Second Radio Button?

Feb 24, 2009

Need a script which selects a second radio button when the first radio button in the pair is clicked with the second button greyed/disable but still displaying the selection.

(Hoping to keep the input 'name' the same too if possible - maybe they can be differentiate by 'id' for the script ?)

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

[Code].....

View 11 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

Pass The Image Attached To The Radio Button From Giftcards.asp To Giftcert.asp?

Jul 21, 2010

i have a form giftcert.html -that has text input boxes the user fills in and a link to the next page for the user to pick a gift card giftcards.asp -the user picks a gift card by radio buttons (over 100)grouped by name and then pushes a button to take them to the next page passing the value of the radio and image (here is the issue) giftcert.asp -this page displays the text boxes from the first page with the value already present (used asp to achieve) and the value of the radio button (a stock number - used asp to achieve) and i want a sample of the image attached to the stock number. how do i pass the image attached to the radio button from giftcards.asp to giftcert.asp i don't know where i am going wrong

a) how do i attach the image to the button do i use an onclick="pass src" and how
b) how do i get the image to show up in giftcert.asp

View 11 Replies View Related







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