473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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,

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

http://www.htmlhelpcentral.com/messa...ad.php?t=13359

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

http://billy.pl3x.net/tests/cloe.html
Oct 4 '07 #2
drhowarddrfine
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

6
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...
4
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...
14
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...
2
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...
5
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
0
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....
10
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...
1
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.