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

295
Vistas
How can we disable a .NET WebForms (.aspx file) LinkButton in Google Chrome

I need to disable a LinkButton in a .aspx file using jQuery depending on the value. The button gets disabled in IE 8. But in Google Chrome it is not disabled.

Code:

$(".grid-prev-btn").addClass('ui-state-disabled').attr('disabled', true);

Please give me solution for this issue

I am trying to disable link button for a particular condition it gets disabled in Internet Explorer but in Chrome browser it not getting disabled

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

ok, really you should be using prop instead of attr for recent implementations of jQuery

$(".grid-prev-btn").addClass('ui-state-disabled').prop('disabled', true);

attr would be more applicable to the written disabled="disabled" attribute on a tag, so should more correctly be .attr("disabled", "disabled")

However, disabled on hyperlinks isn't supported on modern browsers, so I'd suggest the following. The .attr, disabling pointer-events and adding a click handler for should the link be triggered by the keyboard

As you are using jQuery 1.8.x, I would recommend the full solution as follows.

$(".grid-prev-btn").addClass('ui-state-disabled').attr('disabled', 'disabled').css('pointer-events', 'none').on("click", function() { return false; });

You could of course remove the pointer-events bit from inline, and put it in your CSS for .ui-state-disabled

a.ui-state-disabled { pointer-events: none; }
about 4 years ago · Juan Pablo Isaza 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