The objective of this extention is that I can type something into my extention, press submit and and alert to show up with my input.
In my popup.html:
<form id="form" onsubmit="return false;">
<input type="text" id="userInput" />
<input type="submit" onclick="othername();" />
</form>
manifest.json:
{
"matches": [
"<all_urls>"
],
"js": ["content.js"]
},
and the content.js:
alert("test");
function othername() {
var input = document.getElementById("userInput").value;
alert(input);
};
The "test" alert shows up, so I know he code is running, but when I type in a value and press submit, I do not get a popup. Any help would be much appreciated.