Solved

Have an inout hidden field if question to previous radio button is checked or clicked

Posted on 2004-04-01
3
188 Views
Last Modified: 2013-12-24
How do I code the following:

If a previous radio button is clicked then I want an input type hidden field to take place

I'm using javascript and coldfusion
0
Comment
Question by:gaby22
3 Comments
 
LVL 9

Expert Comment

by:CFDevHead
ID: 10734067
previous radio button from the same page???
0
 

Author Comment

by:gaby22
ID: 10734213
yes same page
0
 
LVL 15

Accepted Solution

by:
tim_cs earned 500 total points
ID: 10734703
Hopefully this is helpful.

<script language="javascript">

 function buttClicked(button, radioChoice, field)
       {


             var hidField = eval("document.test." + field);
             radButton = eval("document.test." + button)
             hidField.value = radButton[radioChoice].value;

       }

 </script>

<form name="test">
 <input type="radio" name="buttonN" id="butt1" value="butt1" onClick="buttClicked('buttonN', '0' ,'hidden1');">
 <input type="radio" name="buttonN" id="butt1" value="butt2" onClick="buttClicked('buttonN', '1' ,'hidden1');">

 <input type="hidden" name="hidden1" value="">

</form>

This will set the value of a hidden field with the value of the button field. If you need something different let me know.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now