/    Sign up×
Community /Pin to ProfileBookmark

Dropdown Box Population

Hello,

the dropcode example in (select values for another dropdown)
[url]http://javascript.internet.com/forms/dropdown-box-population.html[/url] works fine with IE. But is not working with Mozila’s FireFox browser.

can anyone help me to fix this problem? I would be happy if someone send me cross browser dropdown options

thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@javaNoobieOct 25.2004 — Author seems to be trying to use DOM.. I believe DOM methods are cross-browser yes? Try the following:

Replace
myEle.value = x ;
with
myEle.setAttribute('value',x);
and
myEle.text = ItemArray[x] ;
with
<i>
</i>var txt = document.createTextNode(ItemArray[x]);
myEle.appendChild(txt)

Lastly,
controlToPopulate.add(myEle)
with
controlToPopulate.appendChild(myEle)
Copy linkTweet thisAlerts:
@kkmmauthorOct 25.2004 — thx javaNoobie. It works fine. tnx a lot.
×

Success!

Help @kkmm 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.19,
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,
)...