Transferring information from the initiator to a pop-up window in Internet Explorer

I am looking to pass the scope and other values to a child window. It currently works as expected in Chrome, but not in Internet Explorer. Is there a workaround for this issue?

var  templateUrl = "/someviewpage";

  var wOptions$ = 'menubar=no, toolbar=no, location=0, status=no, 
  resizable=no,scrollbars=no,top=175,toolbar=yes,scrollbars=no,resizable=no,width=800,height =' + 
  window.innerHeight;

  var fname$ = 'mike',lname$ = 'jackson';  
   var dataDto$ = {
                fname: fname$,
                lname: lname$,
                parentScope: $scope
            };
  var openUploadWindow$ = $window.open(templateUrl, 'coolpopup', wOptions$);

  openUploadWindow$.data = dataDto$;

Answer №1

Find the solution to a question that was asked and answered on this link: angularjs-issue-passing-data-to-a-new-browser-window-on-internet-explorer

Here is the final code snippet:

var templateUrl = "/someviewpage";

  var windowOptions = 'menubar=no, toolbar=no, location=0, status=no, 
  resizable=no,scrollbars=no,top=175,toolbar=yes,scrollbars=no,resizable=no,width=800,height =' + 
  window.innerHeight;

  var firstName = 'mike', lastName = 'jackson';  
   var dataObject = {
                fname: firstName,
                lname: lastName,
                parentScope: $scope
            };

   $window.data = dataObject;
  var openUploadWindow = $window.open(templateUrl, 'coolpopup', windowOptions);

Inside the popup window JavaScript file:

console.log(window.opener.data);

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Locate MongoDB documentation pertaining to arrays of objects with two specific fields

For instance, consider a Mongo db collection: [ { "user_id": 1, "lead_id": 901, ... ... }, { "user_id": 2, "lead_id": 902, ... ... }, { "user_id": 2, & ...

How to use JavaScript regular expressions to verify that an input contains more than zero characters

Can someone help me with a simple regex issue? I've tried searching online but couldn't find a suitable example. I'm struggling with regex and just need to ensure that an input contains more than 1 character (i.e. is not blank). My code uses ...

Deleting an object with javascript in django: A step-by-step guide

Is there a way to use JavaScript to create a confirmation window before deleting an item? <div class="card-footer"> <a href="{% url 'course_delete' student.slug %}"><button>Delete</button>&l ...

Clicking on a series in HighCharts will dynamically add a div element

When working with high charts, I encountered an issue where I wanted to create a popup when clicking on each bar using the jQuery balloon popup plugin. Below is the code snippet: plotOptions: { series: { slicedOffset: 0, ...

Retrieve the present time of an ongoing CSS3 animation

I've been trying to retrieve the current time of a running animation, but I haven't had any luck so far. I can easily grab the start time using: myelement.addEventListener('webkitAnimationStart', function (evt){ console.log(evt.elaps ...

"Encountering a Firebase authentication issue with email in Angular

My code successfully calls my firebase factory when a valid username and password are entered. However, if an incorrect username and password are used, I encounter error 400. Below is the snippet of code from my factory that connects to Firebase: firebas ...

Creating a table using Ng-repeat in AngularJS: A Step-by-Step Guide

I'm trying to figure out how to create the table below using ng-repeat. Unfortunately, I don't have permission to modify the json structure so I need to work with it as is. Here's my json: $scope.carCollection = { 'Toyota': [ ...

Ionic: Vertical scroll bars becoming unaligned when injecting views into a splitview

After experimenting with the split view feature and exploring routing, I wanted to create a "main layout" split view and dynamically inject different views into it at runtime. You can see an example of what I'm trying to achieve in this Plunk. In my ...

How to create an array of objects using an object

I have a specific object structure: { name: 'ABC', age: 12, timing: '2021-12-30T11:12:34.033Z' } My goal is to create an array of objects for each key in the above object, formatted like this: [ { fieldName: 'nam ...

Exploring the functionality of Next.js with Links and routes

Currently, I am facing an issue with the popover menu in my header that displays products. The problem arises when I click on a product in the list; it navigates correctly to the path "products/some-product" regardless of the selected item. However, if I a ...

Deliver a numerical input to the component on an equivalent hierarchical tier

I need to find a way to pass the values of the "things" array to another component on the same level in my app. The structure of my app is as follows: sidebar.component data.service body.component In the sidebar component, I have a button that triggers a ...

Display a "Loading" image in the gallery before anything else loads

Can a animated loading gif be implemented to load before the gallery images, or would it serve no purpose? The image will be loaded as a background using CSS. <link rel="stylesheet" href="loading.gif" /> Appreciate your help! ...

The anticipated reply was supposed to consist of an array, however it ended up being an

I'm brand new to Angular and I've been searching for a solution to my issue with no luck. My app is supposed to retrieve data from a MongoDB database and display it to the user. However, I keep getting this error message: Error: [$resource:bad ...

JavaScript: How to Build a Digital Grocery List with Browser Storage

Struggling with a tough exercise question, I could use some help deciphering it. https://i.stack.imgur.com/V5he2.png Here is how I've started the code: <!DOCTYPE html> <html> <head> <title></title> <script> fun ...

Vue is set up to monitor changes in two connected input fields for user input exclusively

Two input fields are available, where the value of one can affect the other. If a value between 1 and 200 is entered in the level field, Vue will look up the corresponding points for that level and populate the points field with them. Conversely, if a us ...

The correlation between frames per second (FPS) and the milliseconds required to render a frame in the stats plugin is known as the frame

Recently, I've implemented the Stats.js plugin to keep track of my three.js performance. Something seems off with the FPS (frames rendered per second) and MS (milliseconds needed to render a frame) information: According to my calculations, if it ta ...

This particular JavaScript function is only designed to operate on the initial input box in the provided

I have a question regarding echoing rows of $data inside input boxes. I am using a JavaScript function that is supposed to copy the input value to the clipboard when the input box is clicked. However, I am encountering an issue - the function only works ...

display data labels within the chart - utilizing the power of angular.js in conjunction with chart.js

My goal is to display the chart's information without requiring the user to hover over any part of the chart. I am utilizing Chart.js with Angular.js I have the same question as this one posted here: question here! html code: <div class="wrapper ...

Ensure that you accurately maintain object ids following the creation of elements using ng-repeat

I have a set of items listed with unique objects within my controller $scope.itemsList = [ {"id": 0, "item": "sw", "category": 'A' }, {"id": 1, "item": "mlr", "category": 'B'}, {"id": 2, "item": "lvm", "category": 'C&a ...

Making changes to a list by adding or removing items, as well as adjusting the overall total

I'm in the process of creating a unique feature similar to a shopping cart, but instead of adding items to the cart, I'm adding them to a shortlist. My goal is to add the item to the shortlist, update the count on the shortlist, and then display ...