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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:13:16+00:00 2026-06-14T23:13:16+00:00

I have a login window that I open as a Chrome installed Extension (will

  • 0

I have a login window that I open as a Chrome installed Extension (will be a stand-alone chrome web app, so I use the manifest.json to setup the .js file which then opens the little login window.

I want it so that when the user enters correct credentials, and clicks login, I can then open the main application window.

My login window opens fine, but can’t get the next window to open. I’m sure this has something to do with sandboxing, but I don’t know where I’m going wrong.

Here’s my code for each so far, w/o CSS.


manifest.json

{
    "name": "CAD",
    "description": "A CAD Call Sheet",
    "manifest_version": 2,
    "minimum_chrome_version": "23",
    "version": "0.1",
    "offline_enabled": true,
    "app": {
        "background": {
            "scripts": ["mainInfo.js"]
        }
    },

    "icons": {
        "16": "assets/icon-128x128.png",
        "128": "assets/icon-128x128.png"
    }
}

mainInfo.js

chrome.app.runtime.onLaunched.addListener(function() {
  chrome.app.window.create('CADLogin.html', {
    width: 250,
    height: 250,
    maxWidth: 250,
    minWidth: 250,
    minHeight: 250,
    maxHeight: 250,
  });
});

CADLogin.html

<!DOCTYPE html>
<html>
    <head>
        <title>Login</title>
        <link rel='stylesheet' href="CADLogin.css" type='text/css' />
        <script type="text/javascript" src="CADLogin.js"></script>
    </head>

    <body>
        <header>
            <h1 class="loginHeader">CAD Login</h1>
        </header>

        <form id="loginForm">
            <br />
            <div id="loginUsernamediv">
                <input class="loginFields" type="text" id="loginUsername" name="loginUsername" placeholder="Username" />
            </div>

            <div id="loginPassworddiv">
                <input class="loginFields" type="password" id="loginPassword" name="loginPassword" placeholder="Password" />
            </div>

            <br />

            <div id="loginButtonsdiv">
                <button class="loginButton" id="loginButton">
                    Login
                </button>
                <button class="loginButton" id="cancelButton">
                    Cancel
                </button>
            </div>

            <br />
            <br />

        </form>
    </body>

</html>

CADLogin.js

window.onload = function() {

    document.getElementById("cancelButton").onclick = function() {
        window.close();
    }

    document.getElementById("loginButton").onclick = function() {
        var username = document.getElementById("loginUsername");
        var password = document.getElementById("loginPassword");
        if (username=="brian" && password=="letmein") {
            chrome.app.window.create('MainSelections.html', {
                width: 100,
                height: 250,
                maxWidth: 100,
                minWidth: 100,
                minHeight: 250,
                maxHeight: 250
            });
        }
    }
}

Any help is appreciated.

  • 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-14T23:13:18+00:00Added an answer on June 14, 2026 at 11:13 pm

    Ok, so checking for Typos in my code helps. texxt/javascript and text/javascript aren’t the same…and the first will actually make the code not work.

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

Sidebar

Related Questions

on my web site I want to have login/registration form in modal window done
I have an Internet Explorer window open. The title of this window will always
I have a login window with a Sign In button which is set as
I have login- and game-layout in my activity. I would use AndroidAnnotations in my
Assume that I have login to system using PHP + MySQL, then, after I
Hi I want to create a WCF service that have login method, which is
Basically, I currently have login/ in urls.py redirect to the django.contrib.auth.views.login and that seems
We have several sites that use Forms Based authentication (FBA) within SharePoint. Many of
I have written a short python script that opens Google music in web view
I have a problem with an AJAX call that i make to login a

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.