Link to home
Start Free TrialLog in
Avatar of thyros
thyros

asked on

Popup Window Without Chrome (No Toolbars, Menu bars etc)

There are a few ways to open a popup window using javascript, but some methods are more accessibility friendly and cross browser compatible than others.

We would like to link to a 3rd party site, open the link in a new window, without any toolbars, menu bars etc, just the bare minimum.  The site we are linking to has it's own body onload function to resize the window to a certain dimension so we probably don't need to think about that aspect, except opening the new window without the chrome.

I have seen various examples online in the past but am not sure how to create one for this specific situation.  Here is what would be considered a bad example, and a good example.

Bad example:

<a href="javascript:somefunction('http://www.example.com/link7.htm')">popup</a>

Good example:

<a id="popup" href="http://www.example.com/link7.htm" target="_blank">popup</a>

In the 'bad' example, with javascript turned off, the link becomes a total dud.  In the second better example, the link still goes through to the intended site, except that the javascript function to remove the toolbars etc will not take place - which is not as ideal but the content is still accessible, which is what counts.

If this makes sense and you have a solution that is similar to the second example above, please share your code for it.  Thanks.
Avatar of obareey
obareey
Flag of Türkiye image

in the link7.htm you can write as:
window.personalbar = false;
window.toolbar = false;
window.scrollbars = false;
window.statusbar = false;

Open in new window

Avatar of thyros
thyros

ASKER

Unfortunately, the link7.htm is hosted on a third party server so I would not be able to add that code to their site.  If you have any javascript examples which are hosted on our original site where the outgoing link is, that would be appreciated, thanks.
then I don't know any solutions without JS. but you can just add <noscript>activate JS</noscript> tags and tell user to activate JS.
ASKER CERTIFIED SOLUTION
Avatar of thyros
thyros

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial