Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

354
Views
ERR_BLOCKED_BY_CLIENT ajax function not working in chrome

When Adblock is active in chrome below script is not working in chrome. It shows error in console like this

jquery-1.7.2.min.js:4 GET http://example.com/advertisement/mult_select/30 net::ERR_BLOCKED_BY_CLIENT

jquery-1.7.2.min.js:4 POST http://example.com/advertisement/getCategoryFieldsList/30/0 net::ERR_BLOCKED_BY_CLIENT

I have tried also anti-adblock-killer.user.js. But still it is not working.

<script>
$(document).ready(function(event){
    
$('.category_1').live('change',function(){

var foo = []; 
var name = [];
$('.category_1 :selected').each(function(i, selected){ 
  foo[i] = $(selected).val(); 
  name[i] = $(selected).attr("myTag");
});

//$('.category_title_0').html(name[0]);
var str = (foo[0]).replace(/\,/g, '');
$(this).parent('div').nextUntil('#tit').remove();
var str2 = $(this).find('option:selected').attr('parent_id');
$.ajax({
url: "<?= site_url('advertisement/mult_select')?>"+'/'+str,
success:function(result)
{
$('.mul-select').append(result);
}
});
$.ajax({
    type: "POST",
    dataType: 'script',
    url: "<?= site_url('advertisement/getCategoryFieldsList') ?>"+"/"+str+"/"+str2,
    success: function(result)
    {
        if($("#"+str2).length > 0)
        {
            $("#"+str2).empty();
            $("#"+str2).nextAll('*').empty();
            $("#"+str2).html( result );
        }
        else
        {
        $('#dynamic_fields_div').append( "<div id="+str2+"></div>" );
        $("#"+str2).html( result );
        }
    } 
});

});

});
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

As mentioned in the comments, the issue is that adblock recognizes the word advertisement in the URL and it thinks it's an ad.
Many applications work this way (for example it happened to me that Kaspersky blocked a page on a site i own because it contained the words toss and ban) so you should be careful about the URL you write to take into account that visitors might have applications that block certain bad words.

over 4 years ago · Santiago Trujillo Report

0

In my case i didn't have the name "advertisement" on the url path, but still got the same ERR_BLOCKED_BY_CLIENT error.

I resolved it by giving cache: false option to the $.ajax() function.

I am leaving this comment here, as it may be useful to someone.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!