Connecting Tech Pros Worldwide Help | Site Map

Firefox flickers when adding an Option to Select element

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 11th, 2008, 11:25 PM
Axel Gallus
Guest
 
Posts: n/a
Default 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.options[MySelect.options.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





  #2  
Old March 14th, 2008, 05:15 AM
tomtom.wozniak@gmail.com
Guest
 
Posts: n/a
Default Re: Firefox flickers when adding an Option to Select element

On Mar 11, 6:19 pm, "Axel Gallus" <u...@rz.uni-karlsruhe.dewrote:
Quote:
I add some option items to a <selectbox by:
>
-----
MySelect.length = null; // clears all options in select element
>
for ( var i in Somename )
>
{
>
MySelect.options[MySelect.options.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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.