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 8806077
In Process

The Archive Base Latest Questions

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

I saw a few posts similar to my problem and tried the solutions offered,

  • 0

I saw a few posts similar to my problem and tried the solutions offered, but I’m still having issues with IE8 & IE9 and ‘selectedIndex’. This code returns my variable answerSubmitted as ‘undefined’:

var answerSubmitted = document.getElementById("DropDown-Answers").selectedIndex;

The above works perfectly in all other browsers. Based on another post here, I also tried this:

var answerSubmitted = document.getElementById("DropDown-Answers").value;

Still the same results – works elsewhere, but not in IE8 or IE9. I’ve verified that IE is recognizing that particular element by its ID.

Any guidance here?

MORE INFO:
I’m creating the drop down menu dynamically by going thru a loop and adding variable text between the option and /option tags, like so (note that ‘tempRandom’ is a random number updated each time thru the loop):

tempMenuText = tempMenuText + "<option>" + Answers[tempRandom] + "</option>";     

The results are surrounded by the form an select tags, then I update the innerHTML of my element. This works and generates a working drop down menu. But… perhaps this is a clue: when I put a test with the innerHTML of the menu element into another element to view it, it shows as empty. It’s as though IE is not seeing that there is HTML in the element, thinks it is null, and therefore ‘selectedIndex’ fails as null.

  • 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:01:42+00:00Added an answer on June 14, 2026 at 2:01 am

    This is solved. It turns out it was my error in how I was referring to the ID of the selected item. An associate explained that .selectedIndex only works (in IE, at least), when the ID within the ‘select’ tag is correct. If not, it returns null, which is what was originally happening. All is good now. Thanks for the suggestions.

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

Sidebar

Related Questions

So I have looked around and saw a few posts on similar things but
i saw few android apps got the interface similar with itune(as attached), user can
I have looked into a few posts and saw some related posts on it
I searched SO and saw a few questions posted on the topic, but I
I saw quite a few other posts related to EXC_BAD_ACCESS signals right on glDrawArrays,
I saw a few posts about get columns from subqueries, most of them suggest
I am not very good with STL and I saw few post similar to
I know that there's quite a few subjects similar to this one, but none
i did a few searches and i saw a few people try to do
Today I saw a demonstration of the episerver cms and it had a few

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.