Tips for transferring variables between two browser windows within the same session of Internet Explorer 11

Is there a way to prevent a parameter from displaying in the address bar and avoid storing it locally? For example, the parameter value is like vndfj/dfgdgdfg12/dg==.

I attempted the following code, but it does not work on IE and Edge browsers:

let data = {
  __tkn: "sjkss/sdfsdf/fdffs23=="
}

 let wObj = window.open('./Test');
 wObj.json_data = data; 

Answer №1

One way to achieve this is by utilizing the window.open property,

For instance,

    displayDocument() {
    //generate document link
    let docURL = this.apiBaseUrl + "WestCore/Document/" + this.selectedDocumentId + "/RenderDocument?documentPath=" + encodeURIComponent(this.selectedTemplate);
    window.open(docURL);
  }

Alternatively, here's how I handle rendering blob images in my application using window.open...

  showImageFromBlob(image: Blob) {
    if (window.navigator.msSaveOrOpenBlob) // FOR IE10+
      window.navigator.msSaveOrOpenBlob(image, "download." + (image.type.substr(image.type.lastIndexOf('/') + 1)));
    else {
      var imageUrl = window.URL.createObjectURL(image);
      window.open(imageUrl);
    }
  }

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

Top method for transferring server (C# / Razor) data to an AngularJS application

In our use of DNN, we often encounter the need to pass specific context values (such as page id or module-on-page-id) into an AngularJS application. While we have established our own conventions for achieving this, we are interested in hearing about how ot ...

What is the reason behind the browser not reusing the authorization headers following an authenticated XMLHttpRequest?

As I work on developing a Single Page Application using Angular, I have encountered an interesting challenge. The backend system exposes REST services that require Basic authentication. Surprisingly, while obtaining index.html or any of the scripts does no ...

How can we deliver pure JS, HTML, and CSS content without relying on static HTML pages?

Looking to create a fast app prototype without using React or Vue? I'd like to avoid simply making an html and js file imported within it. Can npm packages, SCSS be used while programming vanilla Javascript minus a framework? ...

How to remove bindings from properties in ngIf with Angular 2+

When using a form with a datepicker, there are certain days where additional fields will be displayed during data entry. An example of this is: <div *ngIf="ticketDate.getDay() === 0" Within this div, I am connecting to some optional properties on my m ...

What is the process for sharing your website content on Google Blogger?

I am currently developing a dashboard for a small business website and I would like to implement a feature that allows users to post directly to their Blogger blog from the dashboard of their own website. This eliminates the hassle of having to switch betw ...

Verifying the execute boolean status or utilizing try/catch with PDO

Apologies for the subpar title. My project heavily relies on AJAX, with most responses returning either 'error' or 'success' messages in an array. In my Javascript code, I display these messages in a custom notification bar. I'm u ...

Presenting JSON information in a concise and visually appealing manner

How can I extract a value from JSON data and display it in an HTML text field? The JSON data looks like this: {"name":"paul"}, but I only want to display "paul" in my text field. Here is my code in CodeIgniter PHP: $data['name'] = $this->name ...

ngIf not working properly with the updated value of [(ngModel)]

I am encountering an issue with a select element that has options. The select is using the [(ngModel)] directive to save selected values into "rightFieldTypeId." I have elements that should be displayed based on the value of "rightFieldTypeId." Even though ...

Getting the Mongoose Model using Express parameters is a simple process

Is it possible to dynamically fetch a mongoose model based on the req.params.model? Check out this example of a Schema const mongoose = require("mongoose"); const Schema = mongoose.Schema; const SmartSchema = new Schema({ SmartPriority: { type: Stri ...

Transforming a non-specific type into a container permits precarious assignments

I'm encountering an issue with the code snippet provided below. Despite having a specific type where Type<boolean> cannot be assigned to Type<true>, when wrapping it in an object type (BoxType as shown), suddenly BoxType<boolean> wro ...

What is preventing me from applying JSON patches in both directions?

My current project involves merging JSON objects using patches following the guidelines outlined in RFC 7396. To achieve this, I am utilizing JSON Merge Patch along with Pretty JSON. Below is the code snippet I have: #!/usr/bin/env node var jsonmergepatch ...

When trying to apply ::ng-deep to a mat-toggle in Angular, the attr binding does not seem to function

I'm looking to modify the 'content' property of a CSS class that is applied when using Angular's Slide-Toggle feature. Below is my SCSS code: :host .red { .mat-toggle { ::ng-deep .mat-slide-toggle-bar{ &::after{ ...

Creating a CSS animation to repeat at regular intervals of time

Currently, I am animating an SVG element like this: .r1 { transform-box: fill-box; transform-origin: 50% 50%; animation-name: simpleRotation,xRotation; animation-delay: 0s, 2s; animation-duration: 2s; animation-iterat ...

Using JavaScript, verify if the user is connected to a network

Does anyone know of a simple method to verify if the user is able to access our website? Determine if they are not receiving a connection error. ...

Animate a div to sense whether it has reached the top or bottom position

Is it possible for a div to animate when it reaches almost halfway while scrolling? I'm looking to achieve this effect on a sticky sidebar, similar to how it works on this website: sample This is the code I have: $(function(){ // document ready ...

Performing an AJAX request to the database when a change occurs, prior to submitting the

In my user setup/create form, I am including a field for the users' license/certification number which needs to be validated and returned to a specific DIV Onchange before the form is submitted. I have heard that using AJAX POST is the way to achieve ...

"Incorporate live data into a line graph using highcharts and information fetched from a MySQL database

I am searching for a way to update my line chart with real-time data using ajax or json without having to reload the whole webpage. I came across some examples that demonstrate this functionality: jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highch ...

Is there a way to bypass the "Error: Another application is currently displaying over Chrome" message using Javascript or Typescript?

Can the "Another app is displaying over chrome error" be bypassed using JavaScript or TypeScript? Error Message: https://i.stack.imgur.com/iSEuk.png ...

How can I send an API request with a callback function as an argument using node.js?

If you want to access the getPlayers(callback) method, it is described as follows: getPlayers(callback) callback - This parameter is necessary. It will be called with an object of players players - An object that contains all the players who are curr ...

What could be causing the "10 $digest error" to appear in my code?

My goal was to create a basic app that could detect the size of the browser and display it. But, I encountered an error message saying "Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!" app.controller('AppCtrl',function($win ...