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 7763535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:41:02+00:00 2026-06-01T14:41:02+00:00

I am developing a simple page action extension in google chrome and it has

  • 0

I am developing a simple page action extension in google chrome and it has the following purpose.

  1. Show a pop-up on click and prompt for username and password.
  2. After a small validation, it should fill the username and password for the website, like gmail.com.

I saw couple of examples on how to do that on window load and I was able to do a pop-up separately. But I am not able to access the parent html from the pop-up’s html.

Any help would be highly appreciated.

Here are the contents of my code.

Manifest.json:

{
  "name": "My First Chrome App",
  "version": "1.0",
  "description": "Auto fill content",
  "background": { "scripts": ["background.js"] },
  "page_action" :
  {
    "default_icon" : "icon-19.png",
    "default_title" : "Auto Fill",
    "default_popup" : "test.html"   
  },
  "permissions" : [
  "tabs"
  ],
  "icons" : {
    "48" : "icon-48.png",
    "128" : "icon-128.png"
  },
  "manifest_version": 2 
}

background.js

function checkForValidUrl(tabId, changeInfo, tab) {
  //checks whether the document contains Steve Jobs
  if (tab.url.indexOf("gmail")) {
    chrome.pageAction.show(tabId);
  }
};
chrome.tabs.onUpdated.addListener(checkForValidUrl);

test.html

<html>
<head>
    <title> Hi Steve </title>
    <script type="text/javascript">
        function fill()
        {
            alert("inside method");         
        }
    </script>
</head>
<body>
    <form name="userinfo" id="userinfo">
        username : 
        <input type="text" name="username"/>
        password :
        <input type="password" name="password"/>
        <input type="button" value="Log In" onclick="fill()";/>
    </form>
</body>
</html>

Thanks,
Shankar

  • 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-01T14:41:03+00:00Added an answer on June 1, 2026 at 2:41 pm

    Create a popup window for your login that has the username and password fields.

    http://code.google.com/chrome/extensions/browserAction.html#popups

    When the popup form is submitted send a message to the background page which then sends a message to your (page’s) content script which is then responsible for filling out and submitting the form.

    http://code.google.com/chrome/extensions/content_scripts.html

    You’ll need to understand message passing to do this:

    http://code.google.com/chrome/extensions/messaging.html

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

Sidebar

Related Questions

I am developing a Google Chrome extension, and need to use the chrome.experimental.webRequest API.
I am developing simple facebook canvas app. I was following this page in documentation:
I am developing a simple web page to be viewed after an iphone application
I am developing a simple page with a form. When I put a input
Im developing a simple app (1 page) and I'm running into an interesting snag.
I'm developing simple pages navigation portlet, and for each page I would like to
I'm developing a simple Facebook app that will live in a Page's tab. I'm
I am developing a windows application using vb.net, I have a simple html page
I am developing a simple web app that uses the Google translation API in
I'm developing a webapp+android app that has its own registration flow - simple authentication

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.