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

The Archive Base Latest Questions

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

I have an advertisement section on my website. For most users, this loads just

  • 0

I have an advertisement section on my website. For most users, this loads just fine and works as intended. However, if the user has an ad-blocker of sorts, the advertisement doesn’t show up and an empty area of the site is displayed.

My solution? I would like to place a background image under the advertisement that asks users to consider enabling advertisements on this site only. This image is un-obtrusive, and gives the user a choice whether or not to support the site they are visiting. Through simple CSS, I can make this work just fine (just use background-image and it’s good).

The problem is that advertisements take a little bit to load (about a second or so for some users). I don’t want this background-image to be displayed BEFORE the advertisement has a chance to load, so I’d like to change the background of the div after a certain amount of time (2-3 seconds, maybe).

Here’s my current attempt at a JavaScript function:

<script type="text/javascript">
function show_banner(){
    document.getElementById('banner').style.background="url('images/banner_bg.png')";
}
function show_banner_delay(){
    setTimeout("show_banner()", 3000);
}</script>

This is the HTML code:

<div id="banner-wrap">
    <div id="banner">
        <!--Google AdSense Code Here-->
    </div>
</div>

I feel like I am probably just missing something as far as basic syntax here, but I can’t seem to figure it out!

THANKS FOR ANY HELP!!!

  • 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-23T09:06:13+00:00Added an answer on May 23, 2026 at 9:06 am

    Drop the show_banner_delay function.
    Test it:

    function show_banner(){
        document.getElementById('banner').style.backgroundImage="url('images/banner_bg.png')";
    }
    
    window.onload = function() {
       setTimeout(show_banner, 3000);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 pages Advertisement.php and Gidc.php and they work if they have user=some
I have a website and I would like to put a DIV above this
I have one entity object (kind) for storing all information from user's advertisement. It
Quick question just to verify something. If I have an HTML5 mobile advertisement that
i have this bean public class Advertisement{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = pkid,
I have a website and I am user of several Affiliate Programs. How can
I am trying to have an advertisement block/div that will be switched to a
have written this little class, which generates a UUID every time an object of
Have deployed numerous report parts which reference the same view however one of them
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:

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.