Close Web Page DIalog

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

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

Any way I can bypass the dialog?
Larry Bristersr. DeveloperAsked:
Who is Participating?
So you would remove the onbeforeunload from #2 and simply call the followed by a window.close() on #2.
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.
Larry Bristersr. DeveloperAuthor Commented:
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.
Larry Bristersr. DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.