/    Sign up×
Community /Pin to ProfileBookmark

Javascript loading on IE slower than Firefox

Hi,

I have a page [URL=”http://blm.sis.pitt.edu:8080/ppiServiceInvoke2/opName/findPartnersWithinThresholdAndList_select.htm”]here [/URL] using Javascript to load several options into a <select> box. The javascript itself is in a separate file [URL=”http://blm.sis.pitt.edu:8080/ppiServiceInvoke2/opName/swap.js”]here[/URL] . The addOrfList(1) function in the body onload event calls the javascript to load the select box. There are about 6300 options to be loaded.

When I load this page into Firefox 1.5.0.11, it takes a second or two and loads fine. However, when I try to load it with IE 7.0.5730.11, it takes a few minutes to load.

I realize this is a lot of options but why does it work fine in Firefox and not IE?

Thanks in advance.

Cheers,

Chris

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 26.2007 — Try this:var thisCTRL=["YAL001C","YAL002W","YAL003W","YAL004W","YAL005C"]; // add reest of values to array;
//begin addOrfList
function addOrfList(inputArg)
{
var thisCtrl = document.myForm['input' + inputArg];
var i = 0, len = thisCTRL.length, opts = "";
while (i&lt;len) {
opts+='&lt;option value="'+thisCTRL[i]+'"&gt;'+thisCTRL[i++]+'&lt;/option&gt;';
}
thisCtrl.innerHTML=opts;
document.body.innerHTML = document.body.innerHTML; // IE update DOM
}

Test this with a small array first to check that option values are returned to the server.
×

Success!

Help @VanJay011379 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...