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

157
Vistas
Refresh all open chrome tabs on a button click event in asp.net

My Requirement - If I am opening multiple localhost tabs with the same url and if I am clicking on a button inside any tab, I want all the tabs to refresh.

Here I have a add button (for a simple add function), so while clicking it I want the additon to happen also want all the tabs to refresh. (I have not included the c# code for addition)

My source code:-

<script type="text/javascript">
  function Refresh()
  {
    chrome.tabs.query({windowType:'normal'}, function(tabs) {
      for(var i = 0; i < tabs.length; i++) {
        chrome.tabs.update(tabs[i].id, {url: tabs[i].url});
      }
    }); 
    return false;
  }
</script>

<asp:Button ID="Button1" runat="server" onClick="Button1_Click" OnClientClick= "Refresh()" Text="Add" />

What I am getting is: Cannot read properties of undefined(reading 'query') at Refresh, at HTMLInputElement.onClick

The add function works fine but the refresh is not happening.

about 4 years ago · Juan Pablo Isaza
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