[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Close Web Page DIalog

I have a java script that closes the browser window.
 function win_close() {
   window.opener = top;
   window.close();
}

However...I get the close window dialog as well

Any way I can bypass the dialog?
 Screenprint
0
lrbrister
Asked:
lrbrister
  • 2
  • 2
1 Solution
 
strickddCommented:
Just to clarify, when you close a javascript window to get back to the parent - opener - window, you get the navigation alert?

If that is the case, you simply have to remove the "onbeforeunload" function from the child page.

If this function is integrated into a template or something, then you will need to pass a javascript variable or querystring parameter to disable this method when it is a child window.
0
 
lrbristerAuthor Commented:
strickdd:
I should have been clearer

I have a web page that is the middle page (#2) in a series of 3

At the pont of click on page 2 button...

I want to close the page I'm on (middle page)  with no dialog while opening a popscreen (which has limited menu etc)

All the while, the original web browser is open.
0
 
strickddCommented:
So you would remove the onbeforeunload from #2 and simply call the window.open(#3) followed by a window.close() on #2.
0
 
lrbristerAuthor Commented:
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now