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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:33:12+00:00 2026-05-23T18:33:12+00:00

The following code can stop the slideshow banner in IE, but cannot pause in

  • 0

The following code can stop the slideshow banner in IE, but cannot pause in Firefox ?
Please help.

Thanks.

Joe

The following is my javascript code to display banner:

var promotionTime;
var p=0;
var zone=0;

function changeBanner2(imgFile,imglink,altText){
//pause banner when mouseover
if((document.getElementById("promotionBanner").getAttribute("paused"))!=true)     {     
document.getElementById("promotionBanner").src=imgFile;
document.getElementById("promotionBanner").title=altText;
document.getElementById("bannerLink").href=imglink;
} }

function promotionBannerChanger(promotionImg,promotionLink,promotionAlt,num){
if(zone!=num){
    p=0;
    zone=num;
}

//set attribute to pause banner when mouseover
document.getElementById("promotionBanner").onmouseover =
                     function() { this.setAttribute("paused", true);}
document.getElementById("promotionBanner").onmouseout = 
                     function() { this.removeAttribute("paused");}

changeBanner2(promotionImg[p],promotionLink[p],promotionAlt[p]);
p++;
if(p>=promotionImg.length){
    p=0;
}
clearTimeout(promotionTime);
if(num==1)
    promotionTime=setTimeout("promotionBannerChanger(promotionImage1,promotionLink1,promotionAlt1,'1')",2000);
else if(num==2)
    promotionTime=setTimeout("promotionBannerChanger(promotionImage2,promotionLink2,promotionAlt2,'2')",2000);
else if(num==3)
    promotionTime=setTimeout("promotionBannerChanger(promotionImage3,promotionLink3,promotionAlt3,'3')",2000); }

ASP code:

            <td width="480" >
            <div id="banner" oonmouseover="paused=true;" onmouseout="paused=false;">
                    <a id="bannerLink" href="archive.htm"><img title="Hot Topic" src=./promotion/1/en/c1Lagge.GIF id="promotionBanner" width="480" height="252"  border="0"></a>
            </div>
                </td>
            </table>
  • 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-23T18:33:12+00:00Added an answer on May 23, 2026 at 6:33 pm
    document.getElementById("promotionBanner").onmouseover =
                             function() { this.setAttribute("paused", true); };
    document.getElementById("promotionBanner").onmouseout = 
                             function() { this.removeAttribute("paused"); };
    
    
    function changeBanner2(imgFile,imglink,altText){
        if(document.getElementById("promotionBanner").getAttribute("paused")) {
            document.getElementById("promotionBanner").src=imgFile;
            document.getElementById("promotionBanner").title=altText;
            document.getElementById("bannerLink").href=imglink;
        }
    }
    

    Basically, on hover, you add the “paused” attribute to the promotionBanner, if that is the relevant element. If the timeout function gets run while the “paused” attribute is active, don’t advance the banner. You may also want to return a true/false value from changeBanner2 in order to determine whether or not you advance the counter. This way, you won’t skip images when the mouse leaves and the banner starts up again.

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

Sidebar

Related Questions

The following code works, but I can't figure out what's going on memory-wise. Where
How can i stop the following code executing if its ID is the one
The following code can be found in the NHibernate.Id.GuidCombGenerator class. The algorithm creates sequential
i have written the following code: As you can see there is a for
I have the following code and I can't understand what does it mean: var1
The following code gives a NullReferenceException since XPathSelectElement can't navigate through the XPath expression
Can anyone explain why following code won't compile? At least on g++ 4.2.4. And
Can someone explain the following code snippet for me? // Bind base object so
How can I write the following code quickly in emacs? \newcommand{\cA}{\mathcal A} \newcommand{\cB}{\mathcal B}
How can I make sure in the following code snippet that IDataReader is disposed

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.