window.open

When page is opened with window.open, how can the opened page allow the opener to access its contents?

大城市里の小女人 提交于 2021-01-27 19:32:53
问题 Is it possible for a page opened with window.open to allow itself to be examined by a cross-origin opener? (This is for use in internal applications, so security is not a significant concern.) And if so, how? I've tried replacing all of the CORS and Same-Origin policies I can find and I still get Access Denied on all properties for a child window. In particular I am trying to use Internet Explorer 11 Headers These are all of the headers I've tried so far Access-Control-Allow-Origin: http:/

Appending children into a popup-window. (JavaScript)

浪子不回头ぞ 提交于 2021-01-27 19:00:42
问题 I'm having some trouble trying to get a fairly simple popupper to work. The idea is that the parent should open a popup window and then append a div in it. The relevant parts of the code: parent.html : var childWindow; function togglePref() { childWindow = window.open("popup.html", "prefPopup", "width=200,height=320"); } function loadPopupElements() { var prefElements = document.getElementById("prefBrd").cloneNode(true); var childDoc = childWindow.document; var childLink = document

Export 2D javascript array to Excel sheet

空扰寡人 提交于 2020-06-27 11:19:27
问题 I know, there are hundreds of questions on this topic on here, but I still could not find satisfactory answers after a day of searching: I have a 2D javascript array, which I want to download as an Excel sheet. Here is a fiddle with the code I got so far: https://jsfiddle.net/3an24jmw/7/ The download works, but there are several issues, which I could not solve after days of trying: All items end up in the first column of the Excel sheet, because Excel interprets the "," separating the

Safari window.open() doesn't work

痴心易碎 提交于 2020-05-27 06:37:05
问题 I need to open external link in a new window. I handle click on edit button in a view: module.exports = utils.Backbone.View.extend({ events: { "click #edit": "onEditClicked" }, "onEditClicked": () => PubSub.publish("EDITOR_REQUESTED"); }); Then I check if the user is logged in. If yes - I send notification "OPEN_EDITOR" and expect a new window to be open with the external link. TextEditorController.prototype.handleMessages = function () { PubSub.subscribe("OPEN_EDITOR", () => { var editor =

Why does this URL do different things depending on how it's activated?

ⅰ亾dé卋堺 提交于 2020-01-24 20:54:06
问题 In a related post (here) I discuss a problem I'm having with a URL action in a SQL Server Reporting Services report. I thought I had solved the problem, but I now realize that I haven't. (I'll update the related post in due course.) I'm generating a URL using string concatenation, and using Javascript so the URL opens in a new browser tab. Here's the code that generates the URL, which I think is pretty standard: ="javascript:void(window.open('http://www.ic.gc.ca/app/opic-cipo/trdmrks/srch

How do I pass any array to a window being opened with window.open()

吃可爱长大的小学妹 提交于 2020-01-22 03:06:26
问题 I have any array called query[] I am opening a new window with: window.open("http://localhost:8081/myapp/Query.action","mywindow","menubar=1,resizable=1,width=600,height=400"); How do I pass this array to the new window so I can use it there. EDIT: I just found this, Pass array to Window which will probably provide the answer. EDIT2: the answer provided in question 2487420 doesn't seem to work, I am using FireFox and openDialog never opens a new window New Requirement: This only has to work