I have a form arranged in a table (you can see an example in the page
http://cosmos.mi.iasf.cnr.it/~lssadm...elp/query.html)
The table is on three columns but has a structure like this. The part
I'm concerned with is the cell FFFFF which contains a multiple <SELECT>
list of <OPTION>s. As you can see the first two rows span more than one
column (if this has any importance).
What I want is to constrain FFFFF not to exceed a given width !
YYYYYYYYYYYYYYYYYYYYY
GGGGGGGGGGggggggggggg
FFFFFkkkkkAAAAAAAAAAA
--ok-kkkkk--buttons--
The part I'm interested in contains something like this
<SELECT NAME = "listOfFields" SIZE=8 MULTIPLE>
<OPTION>first_option_string</OPTION>
<OPTION>second_option_string</OPTION>
....
</SELECT>
The underlying OK button is associated to a javascript, which takes the
selected options, does some parsing and manipulation and appends the
result to one of the text areas in AAAAAAAA
So far I had no problems because the option strings were quite short.
Now some of my option strings can be quite long (100 to 200 characters,
corresponding to some complex mysql expressions). The result is that the
column containing FFFFF is now very wide, sometimes wider than the
screen, and one has to scroll left and right a lot.
I would like to constrain the area *displayed* as FFFFF to limited width
while the values of the options will be displayed in a truncated form,
and passed in their entirety to the javascript
+-----------+
|opt1 |
|opt2:xyz |
|long_and_tr|ncated
+-----------+
I tried things like this :
1) assigning <TD width=30%> or <TD width=200> to the table cell
containing the <SELECT>. The width specification is ignored.
2) replacing <OPTION>long_string</OPTION> with
<OPTION value='long_string>short</OPTION>
the display is short, but the short value is passed as value
to the javascript once it has been selected !
3) replacing <OPTION>long_string</OPTION> with
<OPTION label='short'>long_string</OPTION>
this is not honoured at all by any of Netscape 3, 4, 7 and Mozilla
Is there a way to limit the width of the <SELECT> or of the table cell
which contains it, which works with the above browsers ?
--
----------------------------------------------------------------------
no****@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.