'Chrome Extension : How to Get a form and fill and submit it
I am building a chrome extension where I need to get HTML from the website. It has a form which needs to be filled and submitted back.
I click the extension button, pop up opens. I enter details. It fetches me a website which has a form that needs to be filled and submitted back. I currently am using tabs to open the URL, fill the form and submit it back, but I dont want the user to see all the happenings.
I also tried Ajax but not sure how exactly to get HTML, fill the inputs and submit it back.
I tried iFrames but then I get the Unsafe javascript error. Not sure I want to use background page as it will be running in the background always.
Is there any way I can actually make it happen in the background?
Thank You
Solution 1:[1]
Simple REST Client is an extension that allows you to do something similar, you can peek into its source to get some ideas.
Also see Chrome Extension Development - POST to new tab as the first answer shows you how to submit a fake form using JS.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Community |
