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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:22:00+00:00 2026-06-09T23:22:00+00:00

We have a feature in a Windows application that opens a web browser, navigates

  • 0

We have a feature in a Windows application that opens a web browser, navigates to certain pre-configured web sites, and auto-fills the forms with data from our database — it’s a convenience feature for users.

Now we want to build an Asp.Net version of this feature so that from our web app, the user clicks a link/button, and we open the page (with a redirect? with JavaScript?). Then we fill in the form so that the user can review the data and submit it.

To do this, I think that we would either need to inject javascript into the browser frame that is loading the external window, or we would need to be able to interact with that window.

We are worried that browser security might not allow this — it could look like some sort of spoofing attack. What would be a good way to do this?

  • 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-09T23:22:02+00:00Added an answer on June 9, 2026 at 11:22 pm

    If the Domains, Protocols, and Ports do not match between the website opening the popup and the website being opened in the popup then your code will violate the Same Origin Policy and either be silently ignored or throw an exception.

    Here’s an example to demonstrate:

    <!doctype html>
    <html>
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <script type="text/javascript">
        openPopUp = function(href) {
            var props = "width=500,height=500,menubar=no,toolbar=no,scrollbars=yes";
            var win = window.open(href, href, props);
            if (win == null) alert("Your popup blocker is ruining my demo.");
            return win;
        };
    
        openMe = function(url){
            href = (url=="")?document.location:url;
    
            pu = openPopUp(href);
    
            //This will be ignored silently if Same Origin Policy is violated
            pu.onload = function() { 
                p = pu.document.createElement("p");
                p.appendChild(pu.document.createTextNode("onload was here."));
                pu.document.body.appendChild(p);
            };
    
            //This will throw an exception if Same Origin Policy is violated
            setTimeout(function() { 
                p = pu.document.createElement("p");
                p.appendChild(pu.document.createTextNode("setTimeout was here."));
                pu.document.body.appendChild(p);
            },3000);
    
            return false;
        }
    </script>
    <body>
    <a href="" onclick="return openMe(this.href);">Self</a>
    <a href="https://www.google.com/" onclick="return openMe(this.href);">Google</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web MVC application that I would like to add feature that
I have a C# application that has links to certain features on a web
I have an C# aspx web application that opens a popup window with JavaScript.
I have a feature of my application which depends on alternate-click. Windows users don't
I am developing a web application that manages a population of plants. One feature
I've created a Windows Mobile application that opens, edits and closes a data file
I have a command line winforms executable that calls into a Windows winforms application.
We have built an desktop(windows) application that needs SQL Server to store the data.
I'm using IIS and trying to deploy a web application that needs authentication mode=Windows.
I have an ASP.NET WebForms application that has a feature that requires the user

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.