473,396 Members | 1,942 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,396 software developers and data experts.

Hiding a textbox while checking a check box

Hi everyone ! my problem is , i tried to disable a textbox control by writing this code "textbox1.visible =false" inside the checkbox checked event ! but the event didnt fire ! Kindly get me some alternative idea! or plz tell me can i use any other control to do this operation !
Jun 22 '07 #1
4 3488
jhardman
3,406 Expert 2GB
onclick="this.form.myTextBox1.style.visibility='hi dden'"

This isn't really an asp question. I'll send this over to the javascript/ajax forum to see if any of those guys have any comments.

Jared
Jun 23 '07 #2
acoder
16,027 Expert Mod 8TB
Do you want to hide or disable the text box?

You have already been shown how to hide. visibility should be set to "hidden", not 'false'.

To disable instead of hide, use the disabled property and set it to true.
Jun 25 '07 #3
Do you want to hide or disable the text box?

You have already been shown how to hide. visibility should be set to "hidden", not 'false'.

To disable instead of hide, use the disabled property and set it to true.
Dear Sir/mam !

The solution for which i needed is, i need to hide a dropdown list by overlapping the textbox over it while checking the check box(in asp.net vs 05), but the check box's check event doesnt responds or fires when i check the box ! watz the solution for this ! Kindly help me !
Jun 28 '07 #4
Hi everyone ! my problem is , i tried to disable a textbox control by writing this code "textbox1.visible =false" inside the checkbox checked event ! but the event didnt fire ! Kindly get me some alternative idea! or plz tell me can i use any other control to do this operation !
[HTML]
<html>
<script>
function fun1()
{

if(document.forms[0].testcheck.checked == true)
{
document.forms[0].username.style.visibility='hidden';
}
else
{
document.forms[0].username.style.visibility='visible';
}
}
</script>
<body>
<form>
checkbox testing example.
<input type="text" name="username" value="Test">
<input type="checkbox" name="testcheck" onclick="fun1()">
</form>
</body>

</html>
[/HTML]
Jun 28 '07 #5

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

Similar topics

1
by: bala | last post by:
hi there the senario - an A2k application is distributed as a mdb to various users. they are not packaged. rich textbox is being used in one form. requirement - in some of the user's machine...
1
by: Dan Neely | last post by:
I want to have my textbox display a scrollbar if there is more text than will fit, but to make it invisible if it will all fit. Is this possible? The default behavior if all the text fits is a...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
9
by: D. Shane Fowlkes | last post by:
(ASP.NET 2 / VB) Question - How can I write a If statement to see if a control (textbox) actually exists on a page? Upon page_load, a certain control may or may not be visible on the page so I...
17
by: rohitchawla | last post by:
i am trying to show and hide a div when onmouseover and onmouseover another div element. i am setting a setTimeout duration on onmouseout to delay the hiding of div for around two second The...
10
daoxx
by: daoxx | last post by:
Hello I've searched, posted and solved this (Thanks for helping!), but now it came back to bite me in the *ss. I have a Yes/No field that is represented by a check box in my form1. I want to...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
2
by: jd | last post by:
I have several textboxes in which the end user can enter values. When the user presses the Enter key when in any of the textboxes, or leaves that textbox, I want a routine to run (mathematical...
2
by: mathewgk80 | last post by:
Hi, I am trying to check whether the textbox contains single quote,double quote and < and > symbols. I got the regex to check all the requirements. its as shown below. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.