473,698 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dynamic combo boxes widths

Hi everyone,

I've been reading up on how to create a drop down box who's context is
dynamically produced based on the value of a previous select box. I've
read a lot about some of the browsers not properly readjusting the
width of a dynamically produced drop down box, and some browsers having
problems adjusting the height and widths (most notably NN). Most
solutions involve manually refreshing the browser window and/or padding
the options, which to me seems a bit kludgy. For example:

http://webmonkey.wired.com/webmonkey...tw=programming

describes a way of padding the entries

http://groups.google.com.au/group/mi...ed0be2909a3cde

describes a way of padding the initial entries, and

http://groups.google.com.au/group/mi...c6a2cc813cd8a6
http://groups.google.com.au/group/mi...253c095ebabf23

talk more about padding.

To me changing the width of combo boxes seems like an essential
property of javascript, and both my browsers (IE6 & Firefox 1.0.7) do
it (not sure about NN). What version of browsers behave in this way?
I'm asking because the information I'm reading may be outdated. If
current browsers still haven't fixed this problem, is there a more
elegant way of solving the problem without resorting to padding?

TIA

Taras

Dec 26 '05 #1
2 1981
ta******@gmail. com said the following on 12/25/2005 7:08 PM:
Hi everyone,

I've been reading up on how to create a drop down box who's context is
dynamically produced based on the value of a previous select box. I've
read a lot about some of the browsers not properly readjusting the
width of a dynamically produced drop down box, and some browsers having
problems adjusting the height and widths (most notably NN). Most
solutions involve manually refreshing the browser window and/or padding
the options, which to me seems a bit kludgy. For example:

http://webmonkey.wired.com/webmonkey...tw=programming
That article is mostly junk as it uses eval to get a handle on an array:

var the_array = eval(the_array_ name);

Too bad he doesn't know that all Arrays are properties of the Window:

var the_array = window[the_array_name]
describes a way of padding the entries

http://groups.google.com.au/group/mi...ed0be2909a3cde
That thread is 6 years old. And knowing Grassblad from the past, should
be avoided.
describes a way of padding the initial entries, and

http://groups.google.com.au/group/mi...c6a2cc813cd8a6
Thread refers to NN4 which is all but dead so you can disregard NN4
series browsers.
http://groups.google.com.au/group/mi...253c095ebabf23
That thread is also 6 years old so you can disregard it.
talk more about padding.

To me changing the width of combo boxes seems like an essential
property of javascript, and both my browsers (IE6 & Firefox 1.0.7) do
it (not sure about NN). What version of browsers behave in this way?
Changing the width of a "combo box" (It is a Select Element) is not a
property of javascript. It is the browsers duty/job to render items, not JS.
I'm asking because the information I'm reading may be outdated.
It is.
If current browsers still haven't fixed this problem, is there a more
elegant way of solving the problem without resorting to padding?


You are worrying too much about something you shouldn't need worry about.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 26 '05 #2
Thanks Randy. I thought that the stuff might seem a bit outdated.

Dec 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4314
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
1
1589
by: Dalan | last post by:
Sometime ago I had inserted two Combo Boxes on a form (cboCustomers) and (cboVendors) to lookup values in separate tables. They have worked fine except now I want to increase their usage by changing the Row Source to include any changes made in the Customers and Vendors tables to be reflected in the associated fields on the form (frmAccounts). An example would be changing or correcting the spelling of a Customer or Vendor name. Currently...
1
7740
by: croix | last post by:
Scenario: Department A has divisions 1,2,3 Department B has divisions 4,5,6 I want my form to work such that if I choose Department A from a "Department" combo box, that only 1, 2, and 3 show up in the "Division" combo box and if I choose B then only 4, 5, and 6 are available.
4
2604
by: RBohannon | last post by:
I'm using Access 2000. I currently have a report being generated using the results of a query by form. The form used for this query is an unbound form, frmListDialog. frmListDialog contains two unbound text boxes, txtExamTitle and txtExamNumber. The user enters either the exam title in txtExamTitle or the exam number in txtExamNumber as a parameter for the query. This is currently working fine, however because the exam titles are...
4
64615
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one determines the available options in the other. TERMINOLOGY Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
4
3489
klarae99
by: klarae99 | last post by:
Hello, I am working on an Access 2003 Database. The tables that pertain to this issue are tblOrg, tblState, tblCity, and tblZip. I have posted the table structure with only the pertinant fields below. tblOrg OrgID, AutoNumber, PK ZipID, Number, FK tblState StateID, AutoNumber, PK
1
2670
kcdoell
by: kcdoell | last post by:
Good Morning: I have a form where I am trying to create cascading combo boxes. I have done this before but I am getting the following error that is throwing me off: Procedure declaration does not match description of event or procedure having the same name. Basically have three tables: One for the Division location:
4
2470
by: Karl | last post by:
Using A2000 with 2 tables Table 1 is a reference table with 2 fields Table 2 has 2 fields and 2 combo boxes to lookup date in table 1 Combo1 binds to col 1 in table 1, this works OK Combo 2 is set to bind to col 2 in table 1 but it always binds col 1 Column Count is set to 2 and I can see both columns in the dropdown Bound Column is set to 2
0
8678
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.