Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

351
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda