473,320 Members | 2,112 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,320 software developers and data experts.

I want to click on one radiobutton and enable five text boxes.

I want to click on one radiobutton and enable five text boxes.How to do this??
Jun 18 '07 #1
4 1470
acoder
16,027 Expert Mod 8TB
Use onclick to detect when a radio button is clicked. To enable the text boxes, use the disabled property (set it to false).
Jun 18 '07 #2
Use onclick to detect when a radio button is clicked. To enable the text boxes, use the disabled property (set it to false).
can u please send me the code
Jun 18 '07 #3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Javascript</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<script type="text/javascript" language="javascript">


function enableElement()
{
var currentEnabled = new Array();
//alert("2");
currentEnabled[0] = document.form1.inp1;
currentEnabled[1] = document.form1.inp2;
currentEnabled[2] = document.form1.inp3;
// alert("3");
for(i=0; i<currentEnabled.length; i++)
{
// alert("4");
//alert(document.form1.currentEnabled[i]);
currentEnabled[i].disabled = false;
}

}

</script>

<form action="index.php" method="post" name="form1">

<input type="text" name="inp1" disabled>

<input type="text" name="inp2" disabled>
<input type="text" name="inp3" disabled>

<input type="radio" name="sel" value="1"
onclick="enableElement();">
</form>

</body>

</html>
Jun 18 '07 #4
dmjpro
2,476 2GB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Javascript</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<script type="text/javascript" language="javascript">


function enableElement()
{
var currentEnabled = new Array();
//alert("2");
currentEnabled[0] = document.form1.inp1;
currentEnabled[1] = document.form1.inp2;
currentEnabled[2] = document.form1.inp3;
// alert("3");
for(i=0; i<currentEnabled.length; i++)
{
// alert("4");
//alert(document.form1.currentEnabled[i]);
currentEnabled[i].disabled = false;
}

}

</script>

<form action="index.php" method="post" name="form1">

<input type="text" name="inp1" disabled>

<input type="text" name="inp2" disabled>
<input type="text" name="inp3" disabled>

<input type="radio" name="sel" value="1"
onclick="enableElement();">
</form>

</body>

</html>

Is there any problem with ur code?????
Jun 18 '07 #5

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

Similar topics

1
by: David Whitney | last post by:
Hi, all. I'm trying to work with some client-side scripting issues with an ASP.NET application. I realize I've probably done something wrong, but at the moment it looks to me like an...
3
by: visual2005beta_developer | last post by:
I have the following problem (especially with the groupname-attribut of the RadioButton-Control) when developing in Visual Studio 2005 Beta. I load an ascx-control in an aspx-page. This...
5
by: Web learner | last post by:
I have to have three RadioButtons and then under one of this RadioButton, I need to put two checkboxes. Something like following: O Temperature Air Water O Radiaton O Wind Velocity The...
2
by: Kil | last post by:
I designed a form that allows the user to enter dates, and click a checkbox so that certain forms may be loaded. However, I have had trouble getting the right information to load. I would like to...
5
by: Barry | last post by:
I've wasted the whole day trying things and researching, but nothing is working. I would *greatly* appreciate if someone can give me the solution to this problem. I'm using the .NET Framework...
1
by: scanreg | last post by:
My form needs to (1) direct to specified URLs based on a combination of form selections and (2) enable/disable form features based on selections within the form FORM Radio 1 - A - B - C ...
5
by: techvaibhav | last post by:
Hello everyone i am stuck in a very annoying problem.Hope you guys help me fix this out. I am displaying questions form a Question database along with its options. Options can be controlled by...
6
by: Jim Devenish | last post by:
I have an unbound form that displays all the days of the year as a calendar. It has 12 rows of text boxes with either 29,30 or 31 in each row. Text box names are of the form: display_01_01,...
11
by: ajaymohank | last post by:
Hello Friends....... in my project i am having a dropdown and based on the values selected from the dropdown, i have to enable 2 radio button. in the on change function of drop down i have written...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.