471,599 Members | 1,096 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 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 2976
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

Post your reply

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

Similar topics

reply views Thread by David Adams | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

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.