473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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


Mar 11 '08 #1
1 2483
On Mar 11, 6:19 pm, "Axel Gallus" <u...@rz.uni-karlsruhe.dewrote:
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
Mar 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: R. Rajesh Jeba Anbiah | last post by:
In IE, I could be able to directly refer the "id", but it isn't possible in Firefox. Somewhere I read the solution is to refer the id like document.getElementById("month") in Firefox. If I do so,...
4
by: Michael Schuerig | last post by:
I'm trying to change the options of a select element by setting its innerHTML. Here's a demo case: <html> <head> <script language="javascript" type="text/javascript"> function addOpts() { var...
3
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to...
4
by: beenamore | last post by:
Hi, I have two select lists and depending on the value selected in the first select dropdown, I want to populate the second list. I tired a couple of different ways, but for some reason, it...
3
by: patrickkellogg | last post by:
I have this code when you click the buttom is suppose to add a job history. it works with firefox, opera, but not ie. (please note - new entries don't have all the elements in them yet, but...
11
by: davecph | last post by:
I'm constructing a website with a layout created with div-tags. They have a fixed width, float left, and display inline. When one of the div's contain a select-element the right-most div floats down...
1
by: CMani | last post by:
Hi, I have an select element which has hidden attribute for each of item. Say Employee Id are listed in List Box, the Name and gender are kept in value and ATTRIB respectively for each code in...
4
by: Patrick Nolan | last post by:
I am using javascript to manipulate optgroups in select elements. When the results are displayed in Firefox 2.0 there is an annoying blank line at the top of the multi-line select box. This...
5
tjc0ol
by: tjc0ol | last post by:
Hi all, I made contact page which allows visitors to input their name, email address, phone number, comments and select a comment type by using <select> element in html with javascript. Among the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.