Hi,
I’m trying to port one of my add-ons from Chrome to Firefox. In order to POST data to new tab I use the next trick in Chrome:
- create local html file with empty FORM element.
- creating JS which parsing URL, extracting params and adding hidden inputs into the form.
- Opening new tab with my local file:
var url = chrome.runtime.getURL("post.html") + "?postData=" + encodeURIComponent(data);
chrome.tabs.create({url: url, active: true});
This trick works in Chrome, but not in FF. Server side script don’t see POST data.
I’ve tried to create basic HTML file with test form without any JS:
<form method="post" accept-charset="UTF-8" action="http://mysite.com/post.php">
<input name="foo" value="bar" type="text">
<input type="submit">
</form>
It is OK if I open it as local file in new tab and still don’t works if I open it from my extension with chrome.tabs.create
.
Any ideas how to fix the problem or how to complete the task in another way?