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

  • SEARCH
  • Home
  • 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 992481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:16:30+00:00 2026-05-16T06:16:30+00:00

One of our devs through together a banner rotater, and while it works fine

  • 0

One of our devs through together a banner rotater, and while it works fine in NOT IE, IE is throwing an error at line 30 (marked below with “***** ERROR ON NEXT LINE”). Can I not sort $$(‘.banner’)?

The error is:
‘Object doesn’t support this property or method’

Using Prototype 1.6.0.3

function changeBanners() {

  // banners are now sorted by their z index so that
  // the ones most in front should be most on top in the DOM
  // ***** ERROR ON NEXT LINE

  banners = $$('.banner').sort(function (a,b){
    _a = parseInt(a.style.zIndex);
    _b = parseInt(b.style.zIndex);
    return _a < _b ? 1 : _a > _b ? -1 : 0;
  });

  // increment z index on all of the banners
  Element.extend(banners);

  banners.each( function (banner){

    Element.extend(banner);
    banner.style.zIndex = parseInt(banner.style.zIndex) + 1;
  });

  // move the first banner to be the last
  first_banner = banners.shift();
  banners.push(first_banner);

  // set it invisible
  Effect.toggle( first_banner.id , 'appear' , {
    duration: 2.0,
    afterFinish: function(){
      first_banner.style.zIndex = 0;  // update its z index so that it is at the end in the DOM also
      first_banner.show();            // make it reappear so that when the one in front of it disappears, it will show through
    }
  });
};
  • 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-16T06:16:31+00:00Added an answer on May 16, 2026 at 6:16 am

    *Sigh*

    After all of that, it’s my lack of remembering to declare variables in JS

    Changed:

    banners = $$('.banner').sort(function (a,b){
        _a = parseInt(a.style.zIndex);
        _b = parseInt(b.style.zIndex);
        return _a < _b ? 1 : _a > _b ? -1 : 0;
      });
    

    to:

    var banners = $$('.banner').sort(function (a,b){
        _a = parseInt(a.style.zIndex);
        _b = parseInt(b.style.zIndex);
        return _a < _b ? 1 : _a > _b ? -1 : 0;
      });
    

    Works fine.

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

Sidebar

Related Questions

Today one of our devs had error 9009 from my subwcrev post-build command. It
While implementing google plus one button through addthis on one our localized pages where
One of our MSI's has started failing with Error 2902. It'll get most of
I'm new to ASP.NET and working with one of our inhouse devs, but they
One of our customers reported a crash. She saw the standard error message after
Currently our team (web devs, one designer and one copywriter) all work on separate
I would like to add an easter egg to one our developers' command line
I have Created a Procedure for one of our .Net Devs where they can
I just spent half an one our to find out what caused the Error-Message
As part of one our system's we enable a user in the backoffice to

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.