19

I'm looking for this, but I don't find the solution.

I'm opening a popup using:

window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=w, height=h, top=top, left=left');

All is ok, but it doesn't work, at least in chrome, and I need it working. I found solutions like location=no (but it doesn't work) and use jquery-ui or others libraries...but I need with pure javascript...

Anyone know about this?

EDIT

After this, I'd need hide buttons of maximize and minimize. Thanks in advance for any help.

EDIT 2

And what about minimize and maximize buttons? Is possible delete them in a popup?

Thanks very much, Daniel

Daniel Garcia Sanchez
  • 2,306
  • 5
  • 21
  • 35
  • No, you can not remove the minimize or maximize buttons. It's likely a bad idea to allow arbitrary public sites access to removing common operating system UI conventions. – Joseph Lennox Mar 24 '14 at 19:16
  • u cant remove the minimize and maximise button but you can do away with the address bar. use chrome.windows.create({ url:'', type: 'popup' }); – Altanai Oct 08 '14 at 06:56

1 Answers1

53

Most browsers do not allow you to hide the address of the page anymore. This is for safety reasons, otherwise a phishing site could be placed in front of you and you would have no idea.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • 1
    Thanks for your answer, so I understand that this is not possible, right? Regards – Daniel Garcia Sanchez Mar 05 '13 at 17:23
  • 65
    That's right, it is not possible. It would present a massive security issue. You get a popup, it looks like your bank, you login, Bam!!! No money left for you to donate to Stack Overflow! – jamesmhaley Mar 05 '13 at 17:26
  • 2
    @sparkyfied nice description. – sudhanshu Aug 06 '13 at 06:48
  • 2
    Quite silly if you open a popup window and it displays "about:blank", leaving the address bar visible does nothing for the security. They should allow you to remove it, or display the URL of the opener – xer21 Sep 01 '19 at 13:21
  • 1
    I don't understand you, @NietTheDarkAbsol; wouldn't a page without a visible URL be suspicious enough to make the viewer leave the site when the page fails to display the URL after many reloads? – Sapphire_Brick Jul 06 '20 at 17:45
  • 2
    @Sapphire_Brick Your optimism about the intelligence of most users is admirable. Imagine the average user, then remember that half of all users are not as clever as that. The fact that people still click links in spam emails, still fall for lookalike phishing scams, still fall for *Nigerian Prince scams*, is a clear indication that people are not smart enough to notice something like a missing URL bar. – Niet the Dark Absol Jul 06 '20 at 18:12
  • I'm working on an intranet application. The security concerns of external sites are usually not in effect. – FloverOwe Aug 31 '21 at 00:21