Form Submission Within A Chrome Extension Popup
I'm trying to build my first Chrome Extension. I need it to have a simple form that submits. I'm having trouble getting anything to run on my popup.js file. I found this post to
Solution 1:
To follow up on this, this ended up being the winning code.
document.addEventListener('DOMContentLoaded', function () {
console.log("the doc loaded")
var form = document.getElementById("useCasePostForm")
console.log(form)
form.addEventListener('submit',function(e){
e.preventDefault()
console.log("added to the form")
})
});
Post a Comment for "Form Submission Within A Chrome Extension Popup"