Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!