473,773 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change multiple fields in Form via radio box

2 New Member
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 3261
pozitronic
2 New Member
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 Recognized Expert Expert
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
4081
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 inputs of the inner radio button set (they all share a common name) with javascript. I tried document.getElementsByNames('thename') but it doesn't work. I know this is because this method returns an array which you must then refer to by a specific...
4
2577
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 multiple records and want two values depending on the row they select. slaveform: x=selected
14
2229
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 radiobuttons with values 'Via Email' and 'Printed Brochure'.
2
3155
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 they want. If they need to add more, they click an "add name" button and the javascript inserts another row of input boxes. Each row should have two radio buttons to indicate sex (M F). When you have multiple text input boxes with the same...
5
7042
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
1420
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. After the input fields have been filled out, a button is clicked that changes the target of the form to "_blank" and posts back - opening a new page where the input fields are used to create a pdf document. The problem is getting the target of...
10
6104
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 button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
1
3208
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 code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.