Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6569129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:35:17+00:00 2026-05-25T14:35:17+00:00

Is there an easy solution to POST dynamically aggregated data into a new tab?

  • 0

Is there an easy solution to POST dynamically aggregated data into a new tab?

chrome.tabs.create does not have a ‘POST’ option. Normally I would use

chrome.browserAction.onClicked.addListener(function (t) {
  chrome.tabs.create(
  {
    "url" : "http://super.url",
    "method" : "POST" // oops.. no option.
  });
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:35:17+00:00Added an answer on May 25, 2026 at 2:35 pm

    You can simply combine these two techniques:

    1. You may execute JavaScript commands by adding javascript: prefix at your address bar or in href values of <a> tags.
    2. Only with JavaScript, you can create a form element and fill it with your data then POST it.
    function fakePost() {
        var form = document.createElement("form");
        
        // Create a POST dump at ptsv2.com and change the code
        form.setAttribute("action", "http://ptsv2.com/t/dcgex-1614815819/post");
        form.setAttribute("method", "post");
    
        var params = { userId: 2, action: "delete" };
        for(var key in params) {
            var hiddenField = document.createElement("input");
            hiddenField.setAttribute("type", "hidden");
            hiddenField.setAttribute("name", key);
            hiddenField.setAttribute("value", params[key]);
            form.appendChild(hiddenField);
        }
    
        // Appending the form might not be necessary
        document.body.appendChild(form);
    
        form.submit();
    };
    
    const 
        source = fakePost.toString().replace(/(\n|\t)/gm,'').replace(/\s\s/gm,' '),
        url = `javascript:${source}; fakePost();`;
    
    chrome.browserAction.onClicked.addListener(() => chrome.tabs.create({ url }));
    

    Of course, that’s just a dirty hack. If you need something more elaborate you can use a XHR Object or @Xan’s answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way (maybe built in solution) to convert TimeSpan to localized
Is there an easy way in C# to create Ordinals for a number? For
Is there any easy/general way to clean an XML based data source prior to
Is there an easy way to read an entire Access file (.mdb) into a
I'm new to version control, so I apologize if there is a well-known solution
Is there an easy way to iterate over an associative array of this structure
Is there an easy way to produce MSDN-style documentation from the Visual Studio XML
Is there an easy way to avoid dealing with text encoding problems?
Is there an easy way to tell if a ruby script is already running
Is there an easy way to set the zoom level for a windows form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.