Skip to content Skip to sidebar Skip to footer

Chrome Extension Form Input Text Is Blank On Submit

I'm trying to build a chrome extension that downloads a bunch of items from links, the main logic is in my download.js file and I want to be able to specify in which downloads subf

Solution 1:

You cannot submit to a Chrome extension page. There is no web server to process your POST request in this case. Doing so simply reloads the document (clearing your value from the form).

You need to prevent submitting instead, by specifying type="button" for your button.


Solution 2:

I would add preventDefault() on submit button.

https://developer.mozilla.org/en/docs/Web/API/Event/preventDefault


Post a Comment for "Chrome Extension Form Input Text Is Blank On Submit"