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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:46:37+00:00 2026-05-26T16:46:37+00:00

IE8 is giving me the following error: Object doesn’t support this property or method

  • 0

IE8 is giving me the following error:

Object doesn’t support this property or method on custom.js, line 82 character 7

Here is the code with line numbers:

78 function transpose(chord, increment){
79   var scale = ["C", "C#", "D", "Es", "E", "F", "F#", "G", "As", "A", "B", "H"];
80   return chord.replace(/[CDEFGABH]#?s?/g,
81   function(match){
82      var i = (scale.indexOf(match) + increment) % scale.length;
83      return scale[ i < 0 ? i + scale.length : i ];
84   });
85 }

What should I change so that the code works in IE8? It works properly in Firefox/Chrome and also in IE9.

  • 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-26T16:46:38+00:00Added an answer on May 26, 2026 at 4:46 pm

    You can try a indexOf polyfill, this is needed due to indexOf being part of ECMAScript 5th Edition and thus not implemented by all browsers (actually just IE8 and lower).

    if (!Array.prototype.indexOf) {
        Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
            "use strict";
            if (this === void 0 || this === null) {
                throw new TypeError();
            }
            var t = Object(this);
            var len = t.length >>> 0;
            if (len === 0) {
                return -1;
            }
            var n = 0;
            if (arguments.length > 0) {
                n = Number(arguments[1]);
                if (n !== n) { // shortcut for verifying if it's NaN
                    n = 0;
                } else if (n !== 0 && n !== Infinity && n !== -Infinity) {
                    n = (n > 0 || -1) * Math.floor(Math.abs(n));
                }
            }
            if (n >= len) {
                return -1;
            }
            var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
            for (; k < len; k++) {
                if (k in t && t[k] === searchElement) {
                    return k;
                }
            }
            return -1;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

IE8 is reporting an Unexpected Quantifier error, with the following JS function, which I
IE8 throws an Error: Object required message (error in the actual jquery library script,
I'm testing my site in IE8 in compatibility mode and giving the following javascript
website giving 404 and 406 error on Firefox 9.01. While other browsers like IE8,
IE8 doesn't support ( for instance, but not exclusive to ) :last-child , so
In IE8 on vista I am getting the following JS error, User Agent: Mozilla/4.0
On IE8 (not on IE9 or Safari) I get an error this.text_array is null
When IE8 is released, will the following code work to add a conditional stylesheet?
In IE8 this input.attr(name,exam.exam_Normal[' +normal_id_unique + '].boolean_v); Outputs this only in IE8.... <input propdescname=exam.exam_Normal['1'].boolean_v
In IE8 and below, I'm doing this <ul class=dependants_list style=border-bottom: dashed 1px #53a1dc> <li

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.