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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:52:14+00:00 2026-06-18T06:52:14+00:00

I am just a learner and don’t have clue about javascript and jquery. What

  • 0

I am just a learner and don’t have clue about javascript and jquery. What I want to ad an adblock detector script. What I found is this piece of code which gives a nasty alert message. What I want is to give an ajaxed message just not a message popping out of screen.

<script type="text/javascript">
function _enabled() {
    alert('Hey Dude!!! You are using Adblock on this site? Please disable Adblock or Any other plugin blocking ads. Its the only way we cover the cost of the Servers and Website. Click OK to continue what you were doing');
}
function _disabled() {
    alert('not detected');
}
var _abdDetectedFnc = '_enabled';
var _abdNotDetectedFnc = 'disabled';
</script>
<script type="text/javascript" src="http://www.adblockdetector.com/script.php"></script>

Replacing this code can you please help me with an alternate to this code?

{
        alert('Hey Dude!!! You are using Adblock on this site? Please disable Adblock or Any other plugin blocking ads. Its the only way we cover the cost of the Servers and Website. Click OK to continue what you were doing');
    }

I came along finding some solutions about getting it with jquery or jquery-ui but don’t have the knowledge of what to put here and replacing the code. I tried code example from http://m0006.gamecopyworld.com/games/gcw_notice.shtml which gives a nice friendly Adblock Detect message. But it wasn’t working at all. Only this Alert Message is working on my website.

  • 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-06-18T06:52:16+00:00Added an answer on June 18, 2026 at 6:52 am

    As a very quick alternative, that looks a bit nicer you can use a jQuery-ui dialog (as Ricky Baby said)

    You will also need to include the jQuery and jQuery-ui libraries in your page.
    These can be downloaded from http://jquery.com/download/ and http://jqueryui.com/download/, if you haven’t got them already.

    You can change the “Hey dude …… etc” text to what ever you like

    <html>
    <head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
    </head>
    <body style='height: 100%;'>
    <script type="text/javascript">
    function _enabled() 
    {
        var html = "<div>Adbloc detected</div>";
    
        var diag = $(html).dialog(
        {
            autoOpen: true,
            modal: true,
            close: function() { $(this).empty().remove(); },
            buttons: 
            {
                "Close": function() { $(this).dialog("close"); }
            }
        });
    }
    function _disabled() 
    {
        var html = "<div>Adbloc NOT detected</div>";
    
        var diag = $(html).dialog(
        {
            autoOpen: true,
            modal: true,
            close: function() { $(this).empty().remove(); },
            buttons: 
            {
                "Close": function() { $(this).dialog("close"); }
            }
        });
    }
    var _abdDetectedFnc = '_enabled';
    var _abdNotDetectedFnc = '_disabled';
    </script>
    <script type="text/javascript" src="http://www.adblockdetector.com/script.php"></script>
    </body>
    </html>
    

    Alternatively you could just put a message at the bottom of the screen if you didn’t want a pop up at all

    <div id='adBlockDetected' style='position: fixed; bottom: 20px; left: 0px; width: 100%; display: none;' >Hey dide .... etc </div>
    

    Then in the _enabled() function

    $("#adBlockDetected").css({display: "block" });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just learned about ThreadLocal this morning. I read that it should always be
So, I just learned about CURSORS but still don't exactly grasp them. What is
I have used opera unite for deploying a static html/css/javascript website just for fun.
I just learned this way of initializing a variable in javascript: var MyGlobalVar =
I've just learned javascript and jquery a few weeks ago, since then I always
I have just started learning about socket programming and learned about winsock and achieved
Well I have learned a lot about advantages and disadvantages of Maven. This question
I just learned about comet pattern(Long polling) and very curious to implement a simple
I just learned (the hard way) that Java Component s can only have one
So I just learned about preg_match in PHP the other day and now i'm

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.