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

How can I block a textbox if option box is selected?

Hi , I'm making a useform and I want people to say if they are single cheking an option box, and if they're not single i need them to write their wife name. I already have the 2 option boxes (to choose between single and married) and the textbox (to write their wife's name). The real problem is that i need the textbox and to be blocked if they select single. I need it to be blocked an in another color. If it hides with the label when i click single it's also ok. Thank you very much
Aug 13 '09 #1
2 2679
9815402440
180 100+
if optSingle.value then
textbox1.enabled = false
textbox1.backcolor = vbred
else
textbox1.enabled = true
textbox1.backcolor = vbwhite
endif
regards
manpreet singh dhillon hoshiarpur
Aug 15 '09 #2
CyberSoftHari
487 Expert 256MB
just simplifying above code.
Expand|Select|Wrap|Line Numbers
  1. 'in option click event.
  2. textboxname.enabled = optionname.value 
Aug 17 '09 #3

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

Similar topics

2
by: Targa | last post by:
I have a select box with about 5 options. I need to have one of the options, when selected, display a second select box. The second select box is populated by a database and needs to be preloaded...
4
by: kindermaxiz | last post by:
//I have a form such as this: echo "<form method=\"post\" action=$php_self> <BR><INPUT TYPE=\"TEXT\" NAME=\"textbox\" SIZE=\"40\"> <BR> <select name=\"searchlist\"> <option...
4
by: Benton | last post by:
Hi there, I am working with ASP.NET. I have a TextBox and DropDownList (for customer info input) that I need to tie up, i.e., when the DropDownList item changes (the customer name), the TextBox...
2
by: Nowezo | last post by:
Hi, Can you please help me, I want to write a dropdown box that have an option 'Other' but when the Other is selected my textbox need to be enable and take the textbox value as an output instead of...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
1
by: sparksol | last post by:
I have a form with a drop down box. If you select an option in the drop down box (depending which option is selected) one or two textbox(es) and a submit button display. I would like to keep the...
7
by: TechnoAtif | last post by:
Hi..There is again a similar problem..Now i;ve got the option values of list?menu box to show the textbox. If the option value of list is yes then the textbox is to be displayed . Can anyone...
2
by: manishamca | last post by:
In dropdown i am retriving value from the backend. For eg: in the dropdown list the value selected are employee id..then i want to disply the emp name,job etc in the textbox. If i select a...
5
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, It's been a while, I've got a small problem that I could do with your expertise on. As you know (I Think) I build websites for recruitment agencies, part of the website includes a job...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.