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

127
Vistas
Chrome extension - response of ajax(settings).done won't display in popup

Am trying to display the response data of ajax(settings).done in the popup.html of my Chrome extension. But it is not working. It displays in console.log though.

manifest.json

{
    "name": "Malware Detector",
    "version": "0.0.1",
    "manifest_version": 2,
    "browser_action": {
        "default_popup": "popup.html"
    },
    "permissions": [
        "tabs"
    ]
}

popup.html

<body>
    <div id="resultsDisplay"></div>
    <script src="cloudmersive-validate-client.js"></script>
    <script src="jquery-3.6.0.min.js"></script>
    <script src="script.js"></script>
</body>

script.js

chrome.tabs.query({
    active: true,
    lastFocusedWindow: true
}, function(tabs) {
    var tab = tabs[0];
    // api
    var settings = {
         "url": "https://api.cloudmersive.com/virus/scan/website",
         "method": "POST",
         "timeout": 0,
         "headers": {
              "Content-Type": "application/x-www-form-urlencoded",
              "Apikey": "my_key_here"
         },
         "data": {
              "Url": tab.url
         }
    };
    $.ajax(settings).done(function (response) {
         console.log(response);
         $("#resultsDisplay").html(response);
    });
});
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