472,965 Members | 2,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,965 software developers and data experts.

Change multiple fields in Form via radio box

Hey all,

I would like to do the following:

I have 3 radio boxes.

Expand|Select|Wrap|Line Numbers
  1. <input name="br" type="radio" value="first">Button1<br>
  2. <input name="br" type="radio" value="second">Button2<br>
  3. <input name="br" type="radio" value="third" />Button3<br>
Depending on which is selected, I would like it to change ALL 3 values on the form (below).
Expand|Select|Wrap|Line Numbers
  1. <form method=post name="myform" action="page2.php">
    <input type='hidden' name='item_name' value='Toys'>
    <input type="hidden" name="item_number" value="1">
    <input type="hidden" name="amount" value="29.00">
        <input type="submit" value="Send form!">
In effect:
button1 would change the fields to: Toys, 1, 29
button2 would change the fields to: Bikes, 2, 45
button3 would change the fields to: Beer, 3, 10

Any help would really be appreciated,

Oct 4 '07 #1
2 3203
I was searching high and low for a solution, and just found it....


It works perfectly for what I was looking for...

Oct 4 '07 #2
7,435 Expert 4TB
Yes. HTML/CSS cannot do this and, as your links show, the solution is a javascript one.
Oct 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: TheKeith | last post by:
I am doing a form for my site and would like to enable and disable a radio button set depending on whether one of the choices on an outer radio button set is checked. How can I refer to all the...
by: cwwilly | last post by:
Hello, Thanks for taking a look at this! Problem: I'm trying to pass multiple dynamic values between a slaveform and a masterform. The problem I'm having is on the slaveform I loop through...
by: Oleg | last post by:
Hello there: I've been trying to create two different sets of required fields in one form and to use a radiobutton as sort of a switcher between these sets. In my HTML form there are two...
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
by: SSP | last post by:
Dear ASP.NETers, How would I insert multiple rows of data from a web form? Are there any tute's and stuff around. Couldn't find any myself. Thanks in advance. SSP
by: David Adams | last post by:
Hi, I have an aspx page that has a series of radio buttons that are autopostback. When a selection is made, the form posts back and displays specific input fields for the radio button selected....
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.