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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:54:15+00:00 2026-05-28T07:54:15+00:00

Possible Duplicate: Browser Independence issue Code Working for IE but not for Firefox and

  • 0

Possible Duplicate:
Browser Independence issue Code Working for IE but not for Firefox and Chrome

I’m trying to support some old code, and I have an option element inside a Select element in html:

<select onChange="selectURL(this)" style="font-family:Arial; font-size:12;" id="select1" name="select1">

<option ThisCourse="80921" TITLE="- _ ~ : /  =  ’ ; . , ?  ) (.2\" CLASS="" ID="a368890534077645903f263b5ddc105f" VALUE="/Eclass/CourseFrames.asp?vcCourseGUID=a368890534077645903f263b5ddc105f&amp;vcCourseName=%2D+%5F+%7E+%3A+%2F++%3D++%92+%3B+%2E+%2C+%3F++%29+%28%2E2%5C&amp;vcCourseID=80921&amp;NewWin=0&amp;language=">- _ ~ : /  =  ’ ; . , ?  ) (.2\</option>

There’s some javascript running on that site, and it’s trying to do this:

for (i=0; i<SelectElement.options.length;i++)
if (SelectElement.options[i].ThisCourse == CourseID)
SelectElement.selectedIndex = i

In IE, this works fine – it can manage to get to ThisCourse. However, Firefox and Chrome do not understand SelectElement.options[i].ThisCourse

I’m guessing there’s some modern way to get “ThisCourse”, but I don’t know how.

  • 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-05-28T07:54:15+00:00Added an answer on May 28, 2026 at 7:54 am

    Try using the getAttribute method instead of accessing the property, like this…

    if (SelectElement.options[i].getAttribute('ThisCourse') == CourseID)
    

    IE generally treats property values and attributes alike, however, they are different.

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

Sidebar

Related Questions

Possible Duplicate: Browser-native JSON support (window.JSON) Specifically, is JSON.parse(...) supported by IE7+, Firefox 2+,
Possible Duplicate: jQuery Browser Compatability (IE) I would initially post some code snippets (and
Possible Duplicate: How to disable browser or element scrollbar, but allow scrolling with wheel
Possible Duplicate: Is there a way to detect if a browser window is not
Possible Duplicate: Javascript: Setting window.location.href versus window.location When I tested these code in browser
Possible Duplicate: Disabled button with a alert is clickable in IE8 (browser compatibility Issue
Possible Duplicate: “The breakpoint will not currently be hit. The source code is different
Possible Duplicate: Any php code to detect the browser with version and operating system?
Possible Duplicate: Disable select option in IOS Safari Since safari mobile browser do not
Possible Duplicate: How to embed a web browser control in a cross-platform application? I'd

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.