Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1766 How do I avoid the "close window" message?

You are here: irt.org | FAQ | JavaScript | Window | Q1766 [ previous next ]

This solution was tested using IE6 and NS7.

Because NS7 keeps the original state of the parent window (toolbars, scrollbars, and so on...) a new one must be created as follows:

window.name = 'Form1'
if (document.all) {
  // iexplorer
  x = window.open('default2.asp','Form1','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,widht=800,height=600',0);
} else {
  x = window.open('default2.asp','Form2','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,widht=800,height=600',0);
  window.close('Form1');
}

Submitted by Fabio Vieira

©2018 Martin Webb