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

hide textfield on click

Hi to all of you,

my problem is :
i have two radio button(Yes, No) and two text field below this radio button.

How it is possible when we click in Yes, then both below textfield appear and when we click No then both below textfield disappear.

plz help me.
For any sussetion i m thankful to you.

Regards
anu2007
Oct 13 '06 #1
2 1947
RamananKalirajan
608 512MB
Hello Mam, I think the following code matches your requirement if any more doubts post your query.

[HTML]<html>
<head>
<script language="JavaScript" type="text/javascript">
function doThis()
{
document.getElementById('txtBox1').style.visibilit y="hidden";
document.getElementById('txtBox2').style.visibilit y="hidden";
}
function showThis()
{
document.getElementById('rdNo').checked=false;
document.getElementById('txtBox1').style.visibilit y="visible";
document.getElementById('txtBox2').style.visibilit y="visible";
}
function hideThis()
{
document.getElementById('rdYes').checked=false;
doThis();
}
</script>
</head>
<body onload="doThis()">
<form>
<input type="radio" value="Yes" name ="rdYes" id="rdYes" onclick="showThis()">Yes<br/>
<input type="radio" value="Yes" name ="rdNo" id="rdNo" onclick="hideThis()">No<br/>
<input type="text" id="txtBox1"><br/>
<input type="text" id="txtBox2">
</form>
</body>
</html>[/HTML]

Regards
Ramanan Kalirajan
Mar 18 '08 #2
gits
5,390 Expert Mod 4TB
Hi to all of you,

my problem is :
i have two radio button(Yes, No) and two text field below this radio button.

How it is possible when we click in Yes, then both below textfield appear and when we click No then both below textfield disappear.

plz help me.
For any sussetion i m thankful to you.

Regards
anu2007
changed thread title ... please be sure to use a proper thread title for your post ... read this section of the posting guidelines ...

kind regards
MOD
Mar 18 '08 #3

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

Similar topics

2
by: T.E. | last post by:
Hi all, I'm a newbie in php. I encounter a problem with php form that has only one textfield. If I click on the submit button, the form works fine. However, when I press 'enter', the form...
1
by: Veverita | last post by:
Hi there I'm hoping that someone can help me with a question I have about javascript syntax. I got an html page that uploads an image and some text field to a database. What I'd like to do...
0
by: Soul | last post by:
Hi, In ASP.Net page, Is there a way to retrieve those selected text from a normal TextField? For example, I have a multi-line TextField for user to enter some text. There is also a Button if...
4
by: hartbypass | last post by:
Hello, I have treeview control that I am populating with a XML file. The structure is: Treenode Level 1 Item1 Item2 Item3
0
by: turkmen38 | last post by:
hi every one i am new to java and object oriented programming.my problem is that i wanna acces a text field...in a frame i created a text area and a button.i want to populate textarea when the...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
9
by: learning | last post by:
Hi! Here's my situation: I have one textfield with one 'submit' button in PAGE1.PHP. When I click on the 'submit' button I am sent to PAGE2.PHP where I have a "switch" routine that checks...
10
by: Luxury17 | last post by:
I know this has been posted and asked about many times, but I still cannot seem to find an answer that fits my situation. I am pretty new with javascripting, and have been teaching myself as the...
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
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.