Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Lecar_red (5694)

  (email not shown publicly)

Journal of Lecar_red (5694)

Monday November 14, 2005
10:49 AM

Mac IE strikes again... This time select with optgroups.

[ #27567 ]

Another very strange Mac IE rendering problem. I know, I know, I know stop supporting Mac IE already. Unfortunatly at $work nothing is quite that easy.

This time Mac IE's wonderful support (per half the blogs on the planet) for optgroup usage has bit me in the ass. It seems that when you use a multiple select with a size and style height: <select size="6" multiple style="height=6em;" > And then include a (or multiple) optgroups in that select. It cannot figure out what the correct option count to start displaying the scroll bar since it doesn't actually count the 'optgroup' element as a display element. An example:

<select size="6" multiple name="stuff" style="height: 6em;">
<optgroup label="Group 1">
   <option value="one"> One </option>
   <option value="two"> Two </option>
   <option value="three"> Three </option>
   <option value="four"> Four </option>
   <option value="five"> Five </option>

According to Mac IE the size is '5' which is correct (in the javascript DOM) but it doesn't figure out that the display size is six (it seems to use 'select.length') so it never puts the scroll bar there causing the last element to be impossible to select. You have to pad it with blank options to the size of 'size'. Fun...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.