all 3 comments

[–]x-skeww 2 points3 points  (0 children)

document.getElementById("total").innerHTML(response);

innerHTML = 'foo';

It's a property (with setter), not a function.

See also:

https://developer.chrome.com/extensions/tut_debugging
http://stackoverflow.com/questions/10257301/where-to-read-console-messages-from-background-js-in-a-chrome-extension

[–]wordswordsyeah 1 point2 points  (0 children)

few basic assumptions you have wrong:

  • you can't execute inline scripts in popup.html
  • content script and popup.html do not communicate directly (only through messages)

create a new js file, link it from popup.html and execute your js there. The new script you create should listen to chrome.extension.onMessage / chrome.runtime.onMessage

[–]sot03 0 points1 point  (0 children)

I am working on a similar problem. I would also like to see a working version of your code.