Workaround for IE6 select width cut off options' width

Discussion in 'Javascript' started by SamuelXiao, Jan 5, 2010.

  1. SamuelXiao

    SamuelXiao Guest

    Hi all,
    I have been searching google for hours but still cannot get a
    workaround to suit my application. What I want to do is to make the
    select's behavior looks like FF. http://css-tricks.com/select-cuts-off-options-in-ie-fix/
    has a good example but I am not allowed to use JQuery and even I tried
    the example, the select box will automactically widen when onmouseover/
    onfocus. Is there any way to make it looks like FF? The select
    element's width can be separated/different from options' width?

    Any help would be appreciated.
    SamuelXiao, Jan 5, 2010
    #1
    1. Advertising

  2. SamuelXiao wrote:

    > I have been searching google for hours but still cannot get a
    > workaround to suit my application. What I want to do is to make the
    > select's behavior looks like FF.
    > http://css-tricks.com/select-cuts-off-options-in-ie-fix/ has a good
    > example but I am not allowed to use JQuery and even I tried the example,
    > the select box will automactically widen when onmouseover/
    > onfocus. Is there any way to make it looks like FF? The select
    > element's width can be separated/different from options' width?


    First of all, you need to understand that jQuery is _not_ some book of magic
    that, when its spells are cast, lets you do something that could not be done
    otherwise. *Everything* that can be done with jQuery can be done without
    jQuery, and, considering the error-prone, inefficient code of jQuery, it can
    *always* be done better then. In short: jQuery is JUNK. DO NOT USE.
    (Shoot on sight ;-))

    So you only need to implement what is described "In plain English" there.


    HTH

    PointedEars, clicking away yet another warning message saying "A script on
    this page may be busy, or it may have stopped responding. ... Script:
    http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js:12" in the
    Zattoo Web player (in Iceweasel 3.5.6).
    --
    Danny Goodman's books are out of date and teach practices that are
    positively harmful for cross-browser scripting.
    -- Richard Cornford, cljs, <cife6q$253$1$> (2004)
    Thomas 'PointedEars' Lahn, Jan 5, 2010
    #2
    1. Advertising

  3. SamuelXiao

    David Mark Guest

    On Jan 5, 12:33 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    > SamuelXiao wrote:
    > > I have been searching google for hours but still cannot get a
    > > workaround to suit my application.  What I want to do is to make the
    > > select's behavior looks like FF.
    > >http://css-tricks.com/select-cuts-off-options-in-ie-fix/has a good
    > > example but I am not allowed to use JQuery and even I tried the example,
    > > the select box will automactically widen when onmouseover/
    > > onfocus.  Is there any way to make it looks like FF?  The select
    > > element's width can be separated/different from options' width?

    >
    > First of all, you need to understand that jQuery is _not_ some book of magic
    > that, when its spells are cast, lets you do something that could not be done
    > otherwise.  *Everything* that can be done with jQuery can be done without
    > jQuery, and, considering the error-prone, inefficient code of jQuery, it can
    > *always* be done better then.  In short: jQuery is JUNK.  DO NOT USE. 
    > (Shoot on sight ;-))
    >


    All targets are now free. :)
    David Mark, Jan 6, 2010
    #3
  4. SamuelXiao

    SamuelXiao Guest

    On Jan 6, 1:33 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > SamuelXiao wrote:
    > > I have been searching google for hours but still cannot get a
    > > workaround to suit my application.  What I want to do is to make the
    > > select's behavior looks like FF.
    > >http://css-tricks.com/select-cuts-off-options-in-ie-fix/has a good
    > > example but I am not allowed to use JQuery and even I tried the example,
    > > the select box will automactically widen when onmouseover/
    > > onfocus.  Is there any way to make it looks like FF?  The select
    > > element's width can be separated/different from options' width?

    >
    > First of all, you need to understand that jQuery is _not_ some book of magic
    > that, when its spells are cast, lets you do something that could not be done
    > otherwise.  *Everything* that can be done with jQuery can be done without
    > jQuery, and, considering the error-prone, inefficient code of jQuery, it can
    > *always* be done better then.  In short: jQuery is JUNK.  DO NOT USE. 
    > (Shoot on sight ;-))
    >
    > So you only need to implement what is described "In plain English" there.
    >
    > HTH
    >
    > PointedEars, clicking away yet another warning message saying "A script on
    > this page may be busy, or it may have stopped responding. ... Script:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js:12" in the
    > Zattoo Web player (in Iceweasel 3.5.6).
    > --
    > Danny Goodman's books are out of date and teach practices that are
    > positively harmful for cross-browser scripting.
    >  -- Richard Cornford, cljs, <cife6q$253$1$> (2004)


    Actually, I want to make it looks like FF which the width of <select>
    can be separated from width of <option>, but the example provided
    doesn't work exactly like that. Anyway, I use the plain English to
    write the code, now a workaround has been done. Thanks all!
    SamuelXiao, Jan 6, 2010
    #4
  5. SamuelXiao

    David Mark Guest

    SamuelXiao wrote:
    > On Jan 6, 1:33 am, Thomas 'PointedEars' Lahn <>
    > wrote:
    >> SamuelXiao wrote:
    >>> I have been searching google for hours but still cannot get a
    >>> workaround to suit my application. What I want to do is to make the
    >>> select's behavior looks like FF.
    >>> http://css-tricks.com/select-cuts-off-options-in-ie-fix/has a good
    >>> example but I am not allowed to use JQuery and even I tried the example,
    >>> the select box will automactically widen when onmouseover/
    >>> onfocus. Is there any way to make it looks like FF? The select
    >>> element's width can be separated/different from options' width?

    >> First of all, you need to understand that jQuery is _not_ some book of magic
    >> that, when its spells are cast, lets you do something that could not be done
    >> otherwise. *Everything* that can be done with jQuery can be done without
    >> jQuery, and, considering the error-prone, inefficient code of jQuery, it can
    >> *always* be done better then. In short: jQuery is JUNK. DO NOT USE.
    >> (Shoot on sight ;-))
    >>
    >> So you only need to implement what is described "In plain English" there.
    >>
    >> HTH
    >>
    >> PointedEars, clicking away yet another warning message saying "A script on
    >> this page may be busy, or it may have stopped responding. ... Script:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery..min.js:12" in the
    >> Zattoo Web player (in Iceweasel 3.5.6).


    LOL. Ain't that the kiss of death. And using Google hosting too.
    Somebody has some splaining to do. :)

    [...]

    >
    > Actually, I want to make it looks like FF which the width of <select>
    > can be separated from width of <option>, but the example provided
    > doesn't work exactly like that. Anyway, I use the plain English to
    > write the code, now a workaround has been done. Thanks all!


    Congratulations on _not_ using jQuery. ;)
    David Mark, Jan 6, 2010
    #5
  6. SamuelXiao wrote:

    > Thomas 'PointedEars' Lahn wrote:
    >> SamuelXiao wrote:
    >> > I have been searching google for hours but still cannot get a
    >> > workaround to suit my application. What I want to do is to make the
    >> > select's behavior looks like FF.7
    >> > [http://css-tricks.com/select-cuts-off-options-in-ie-fix/hasagood]
    >> > [...] Is there any way to make it looks like FF? The select
    >> > element's width can be separated/different from options' width?

    >>
    >> [...] you only need to implement what is described "In plain English"
    >> there.
    >> [...]

    >
    > Actually, I want to make it looks like FF which the width of <select>
    > can be separated from width of <option>, but the example provided
    > doesn't work exactly like that.


    This cannot be done except if you forego all attempts to adhere to
    usability/accessibility guides and legislation, and design your own
    control. (Don't.)

    > Anyway, I use the plain English to write the code, now a workaround has
    > been done.


    You may post the relevant parts or (if longer) its URL here so that others
    can benefit and recommendations for improvement can be made.

    However, as it may not be obvious to you: If you would not set the control
    width in the first place, you would not need to apply a workaround for the
    borken MSHTML rendering.

    > Thanks all!


    You are welcome.

    Please trim your quotes to the relevant minimum next time. See above and
    below how it can be done.

    <http://jibbering.com/faq/#posting>


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
    Thomas 'PointedEars' Lahn, Jan 6, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jens Lenge

    DIV height - IE6 workaround?

    Jens Lenge, Mar 5, 2005, in forum: HTML
    Replies:
    16
    Views:
    29,923
    kchayka
    Mar 8, 2005
  2. Just Me

    IE6 Bug Workaround ?????

    Just Me, Mar 28, 2008, in forum: ASP .Net
    Replies:
    7
    Views:
    2,663
    Just Me
    Mar 29, 2008
  3. Tole

    IE6 download bug & workaround

    Tole, Aug 6, 2003, in forum: Javascript
    Replies:
    0
    Views:
    68
  4. Adam Warner

    IE6 SP1 workaround?

    Adam Warner, Nov 9, 2004, in forum: Javascript
    Replies:
    2
    Views:
    121
    Adam Warner
    Nov 9, 2004
  5. armyofda12monkeys

    deselect select list options in IE6

    armyofda12monkeys, Jul 6, 2007, in forum: Javascript
    Replies:
    0
    Views:
    164
    armyofda12monkeys
    Jul 6, 2007
Loading...

Share This Page