August 25, 2001 - Removing the Trusted Application's Border Window Chrome | WebReference

August 25, 2001 - Removing the Trusted Application's Border Window Chrome

Yehuda Shiran August 25, 2001
Removing the Trusted Application's Border Window Chrome
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Trusted applications are considered safe enough to remove the border window chrome from them. The border window chrome includes such important buttons as the close button. Once the border is gone, you won't have a way to close a dialog box. Therefore, make sure your dialog box has an alternative button to close it. This HTA includes the following call:

window.showModalDialog('010825a.hta','','unadorned:yes');
Click the Pop A Dialog Box button. Observe the weird dialog box without any border (IE 5.5 and up). Click the Go Away button to close the dialog box. You cannot remove the border window chrome from a dialog box that opens from an untrusted application. Try it. We try to remove the border by:

window.showModelessDialog('010825.html','','unadorned:yes');
The possible values of the unadorned property are: yes, no, 1, 0, on, and off. Their semantics are intuitive.

For more on modal and modeless dialog boxes, go to Column 90, Modal and Modeless Dialog Boxes.