 <p>I think you are having this problem because of restrictions imposed by the <a href="http://code.google.com/chrome/extensions/trunk/contentSecurityPolicy.html" rel="nofollow">Google Content Security Policy</a>. It mentions that iniline javascript like the one that you have mentioned in you code will not be executed. Try removing the <code>onclick="getSite()"</code> from your HTML markup to <code>content_script.js</code>. Use <code>addEventListener</code> function to attach the event to the button.</p>