Firefox flickers when adding an Option to Select element

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Axel Gallus

    Firefox flickers when adding an Option to Select element

    I add some option items to a <selectbox by:

    -----
    MySelect.length = null; // clears all options in select element

    for ( var i in Somename )

    {

    MySelect.option s[MySelect.option s.length] = new Option(Somename[i],
    i,"True"); // appends new options

    }

    Firefox flickers when the items get added. IE doesn't.

    Is there a way to avoid the flickering in firefox? This is anoying if you
    update the select elemnt from times to times ajaxively.



    Ragards

    R4DIUM




  • tomtom.wozniak@gmail.com

    #2
    Re: Firefox flickers when adding an Option to Select element

    On Mar 11, 6:19 pm, "Axel Gallus" <u...@rz.uni-karlsruhe.dewro te:
    I add some option items to a <selectbox by:
    >
    -----
    MySelect.length = null; // clears all options in select element
    >
    for ( var i in Somename )
    >
    {
    >
    MySelect.option s[MySelect.option s.length] = new Option(Somename[i],
    i,"True"); // appends new options
    >
    }
    >
    Firefox flickers when the items get added. IE doesn't.
    >
    Is there a way to avoid the flickering in firefox? This is anoying if you
    update the select elemnt from times to times ajaxively.
    >
    Ragards
    >
    R4DIUM
    I'll just throw out an idea (~hack) here.

    Have you tried having two select boxes, one shown and one hidden?

    1) Add an item to the hidden box.
    2) Display hidden box (which should be on top of or behind the
    previously shown one).
    3) Hide the first box.
    4) Add the same item to the now hidden box.

    Of course, you'll need extra logic to know which one the user is
    selecting from when submitting the form.

    Just an idea.

    Cheers,

    -Tom Woz

    Comment

    Working...