1

I tried

openDialog('http://stackoverflow.com');

and

openDialog('http://localhost');

Both throw an exception:

  SecurityError: The operation is insecure

in firefox and

 Uncaught ReferenceError: openDialog is not defined

in chrome

openDialog() is not available in all browsers?

I am working on a local machine.

Mohammed H
  • 6,880
  • 16
  • 81
  • 127
  • 1
    [MDN](https://developer.mozilla.org/en-US/docs/DOM/window.openDialog) says `Not part of any standard.` – Teemu Mar 07 '13 at 10:28

1 Answers1

1

window.openDialog is an extension to window.open. It behaves the same, except that it can optionally take one or more parameters past windowFeatures, and windowFeatures itself is treated a little differently.

So, If you are not using the additional arguments use something like :

window.open(
   "http://localhost",
   "DescriptiveWindowName",
   "resizable=yes,scrollbars=yes,status=yes"
 );

or simply

window.open("http://localhost");

If the strWindowFeatures parameter is used, the features that are not listed will be disabled or removed (except titlebar and close which are by default yes).

So yes, nothing possible for the titlebar or close button.

loxxy
  • 12,990
  • 2
  • 25
  • 56
  • I want a simple window. don't want any decorations like titlebar, menubar, etc. or reduce the decoration as much as possible. – Mohammed H Mar 07 '13 at 10:31
  • @habeebperwad Do see my edits there will be no scroll/status bars. Also visit the window.open link, you can find the list of all the features which you can control while opening the new window... – loxxy Mar 07 '13 at 10:38
  • @habeebperwad In the window features string add "toolbar=yes" – loxxy Mar 07 '13 at 11:05
  • I don't want the address bar also. – Mohammed H Mar 08 '13 at 05:23