Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda