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

activating text boxes

tolkienarda
316 100+
hi all
i have an order form and some select boxes with 'other' options and i would like to have a text box for them to write what the 'other' is but i want it to only be visiable or active if someone selects the 'other' option from the drop down box.
if someone could help me i would appreciate it

eric
Apr 2 '07 #1
2 1084
mrhoo
428 256MB
When I have an 'other' in a select element I park an input type=text next to it,
and make its display "none' and it's size the length of the longest option text.
.
If the selected text is 'other' ,the select display is changed to "none" and the text input display to "inline".

listen for the enter key on keypress or a blur from the textbox and

validate and clear the input, add a new option and value (if valid) to the top of the select, swap the display, set the selectedIndex to 0 and run the select's onchange.

A simpler method is to leave the input beside the select but visibility hidden
unless other is selected, and run the onchange directly from the text box's onchange event.
Apr 2 '07 #2
tolkienarda
316 100+
thanks a million

eric
Apr 2 '07 #3

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

Similar topics

1
by: Jeppe 1971 | last post by:
Hi Does anyone know of a way to load a HTML-page and examine the document without activating the code? I am trying to create a search-function in javascript. The idea is that the function...
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
7
by: Gertjan van Heijst | last post by:
Hi, I really hope someone can help me because I've already spend 2 days on this problem and I'm not getting anywhere. I think the problem is that I don't really understand how text boxes store...
2
by: John Kreps | last post by:
(acc 2002) I've got six unbound text boxes on a subform that has a white background. Each of those six boxes has an expression that when true, will change its background from white to another...
11
by: Edson Peacock | last post by:
I have a report with sub reports, one of the subreports have 12 text boxes that are 2" high and I want them all to grow if one goes to 3" high. If anyone has any suggestions they are very much...
2
by: Beejer | last post by:
I have a weird problem that I'm trying to solve but can't seem to find a solution at this time. My Access database closes completely when the "Else" of the VBA code is applicable. I'm running...
4
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I have created a report. This report needs to display records between two dates entered by the user. I put two text boxes on the report so I can enter the start and end date - I set them to use an...
5
by: Advait Mohan Raut | last post by:
Hello friends, In my winwows form, I have two text boxes - textbox1 & textbox2 also the form has two buttons - button1 & button2. button1 will work for textbox1 and button2 will work for...
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.