Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8808473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:37:55+00:00 2026-06-14T02:37:55+00:00

In IE9 I am getting an error Microsoft JScript runtime error: ‘populatedropdown’ is undefined

  • 0

In IE9 I am getting an error Microsoft JScript runtime error: ‘populatedropdown’ is undefined on the line <input type="button"....

I assume I am not escaping the literal values correctly. How should I change?

<html>
<head>
<title>Add items to dropdown</title>

<script type="text/javascript">
function populatedropdown(var devicelist) {
    var devList = document.frm.optdevices;
    var arrDev = split(devicelist, ";");

     devList.options.length = 0; // this removes existing options

     for (var i = 0; i <= 3; i++) {
         var option = new Option(arrDev[i],i);
         devList.options[i] = option; 
     }
}

</script>

</head>
<body>
<form name="frm">

<select name="optdevices">
</select>

<input type="button" value="TestAdd" onclick="populatedropdown('201;202;203;')" />

</form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:37:57+00:00Added an answer on June 14, 2026 at 2:37 am

    First, you should not write var via defining function, and second use of function split is wrong, split should be used like
    var result = strToSplit.split(";"), if you wanna split by ; , you can read about split here Javascript Split method

    here is working snippet

    function populatedropdown(devicelist) {
        var devList = document.frm.optdevices;
        var arrDev = devicelist.split(";");
    
         devList.options.length = 0; // this removes existing options
    
         for (var i = 0; i <= 3; i++) {
             var option = new Option(arrDev[i],i);
             devList.options[i] = option; 
         }
    }
    

    just tested on IE9

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following error when i opened my project in IE9. Microsoft
I am getting an error in IE9 at the line jQuery( #dialog:ui-dialog ).dialog( destroy
I am having trouble getting a horizontal menu to line up correctly in IE9
I am getting the strange error SCRIPT70: Permission denied jquery.js, line 21 character 67
I am getting the follow error on the following line in IE8 ( not
I am getting the following error with my jquery ajax call in IE9, where
I am getting the following error in IE9 when in IE7 mode. Using a
UPDATED I am getting the error: Cannot unregister UpdatePanel with ID 'UpdatePanel1' since it
I'm getting some strange hover behaviour from IE9 which seems to be resulting from
This particular page works on Firefox and Chrome. On IE9, I am getting this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.