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

  • SEARCH
  • Home
  • 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 8317593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:39:24+00:00 2026-06-08T21:39:24+00:00

I am developing a chrome extension which injects an iframe in a particular webpage

  • 0

I am developing a chrome extension which injects an iframe in a particular webpage as soon as it loads. The iframe loads a form(form.php) hosted on localhost. All the information entered on the form is processed by script.js on the localhost.
The PHP File has:

<script src="script.js" type="text/javascript"></script>

There is a submit button on the php file. When it is clicked I want to pass a message and some data to the extension’s background page like:

chrome.extension.sendRequest({'name':'email', value:email});

but I get an error saying:

Uncaught TypeError: Cannot call method ‘sendRequest’ of undefined

What I want is, once the submit button is clicked, all the data that is processed is sent to the chrome extension background page.

Please suggest me any method that can help me do that?

  • 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-06-08T21:39:25+00:00Added an answer on June 8, 2026 at 9:39 pm

    If I understand you right, you want to send a message to the chrome extension background page from the Iframe.

    One way to do this is to inject a content script in the the webpage and have it listen for messages

    window.addEventListener(‘message’, ….)

    On the Iframe, when the data is ready, you can call

    parent.postMessage

    to send a message to the content script in the parent. The content script can forward the message to bg using

    chrome.extension.sendRequest

    Another way is to inject the content script in the Iframe itself by setting

    all_frames: true

    in the extension manifest.

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

Sidebar

Related Questions

At the moment I am developing a Google Chrome Extension in which I have
we are in process of developing google chrome extension, in which we need to
I'm developing a Google Chrome extension, which produces an error I can't fix. My
I'm developing a Chrome extension for a client which want me to embed a
I am developing a chrome extension (my fourth question or so...) for facebook, which
I'm developing a Chrome extension and I've got the following... $(document).keypress(function(event){ resizeDialogIFrame(overlaydiv, iFrame.contentWindow); });
I am developing a chrome extension that runs some javascript on a particular web
I am developing chrome extension, it is a simple extension which call background.js file
I m developing a chrome extension and i want to know that from which
I am developing a google chrome extension which retrieves JSON from server after passing

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.