Questions tagged [window.closed]

29 questions
5
votes
1 answer

IE11- avoid Window close confirmation message

my requirement is when I click to download a file, new tab opens. If the file exists, it will start download and if not, it should close the new tab and show error message. I have used window.close() and it's working fine. Except that, IE11 asks…
2
votes
2 answers

window.closed IE9 reporting true when window is still open

UPDATE 2012-01-10 the popup URL is in another domain as the parent window, which appears to be the issue! How can I solve it? I'm using the following code to detect whether the popup window is closed. It works fine in Firefox 8 and Chrome but…
Bazzz
  • 26,427
  • 12
  • 52
  • 69
2
votes
1 answer

Window.close() is not working after restart

In laravel controller I am using tag in which on button click window.close() is working well, but when i restart my…
sweta ramani
  • 31
  • 1
  • 4
2
votes
2 answers

How can i close tab or reopen popup tab in javascript?

I am trying to get the reference of the newly opened tab and use it in the same function to close the tab and reopen, for more details: I want to create a Java script button on the first click open a new tab on the second click of the same button…
2
votes
3 answers

Close SP.UI.ModalDialog PopUp from code behind

I have a list of Items on an Aspx Page and in order to edit each item I have launched SP.UI.ModalDialog popup to do so, a submit buton is created in this PopUp window to save changes and then close the pop up window : protected void…
1
vote
0 answers

window.close() doesn't work for google domain urls

We have a requirement on our tool wherein when a task is fetched, google search/amazon search pages should auto pop up as new tabs on same window. When the next task is fetched, the previous tasks tabs should close and the new task tabs should pop…
1
vote
0 answers

Opening tabs in javascript and closing them: why doesn't it work on all sites?

I have a problem when I use the network of my professional offices: when I do a Google search in private browsing, it systematically asks for a long and anoying captcha. I found a solution that works: launch 3 occurrences of my search (in 3 tabs).…
Floooowk
  • 11
  • 1
1
vote
1 answer

How to I use inspect element to close the window without it having to open it too?

Each time I try to use window.close(); I just get the error Scripts may only close the windows that were opened by them, is there any way to bypass this?
DiamondUp
  • 21
  • 5
1
vote
1 answer

window.closed is always true

I'm opening a child window to another site where I don't control the content. I've implemented the pattern I found here of using a set timeout to check the window.closed property. I've found this confirmed bug report for edge. Edge Issue Report Here…
1
vote
1 answer

Is it possible to detect window.close from iframe?

I have a modal (a React component from my application), and inside it i have an iframe. I don't have control over the iframe, and I know it calls window.close after some action is taken. Is there a way to detect when the content inside the iframe…
Danilo Ruziska
  • 457
  • 2
  • 6
  • 13
1
vote
0 answers

Close window which was opened by a different application

I have my application as a standalone application. My application will be opened by different application as a new tab window. My application has a close button which should close the current tab. But i see it throws error like scripts may close…
Hacker
  • 7,798
  • 19
  • 84
  • 154
1
vote
2 answers

window.close current window when another window.open is requested

Thank you for taking the time to look at my question. I have two different window.open requests depending on if a user clicks on either a mobile button or a webcam button. a mobcamWindow will open with a certain (small) size when the mobile button…
Joey Thomas
  • 113
  • 8
1
vote
0 answers

How to retain the child window reference on the page reload or refresh in all the browser

Use Case: In my application i have one parent window which can open many child windows. What i have done is i have opened the child window using the window.open() method. And on the click of logout using the same reference i have closed all the…
1
vote
1 answer

Need to Close Current Window on fancybox Button Click

I need it for age verification, When i click on under21 Age button of fancybox- my Current window should be closed. my code is like this:
Gautam D
  • 330
  • 3
  • 15
0
votes
0 answers

google - Auth0.js Cross-Origin-Opener-Policy policy would block the window.closed call

I am creating OwnUI with Auth0.js and getting below error on webAuth.popup.authorize( winchan.js:150 Cross-Origin-Opener-Policy policy would block the window.closed call. winchan.js:195 Cross-Origin-Opener-Policy policy would block the…
1
2