By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,282 Members | 1,504 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,282 IT Pros & Developers. It's quick & easy.

dynamic combo boxes widths

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 26 '05 #2

P: n/a
Thanks Randy. I thought that the stuff might seem a bit outdated.

Dec 27 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.