Reputation: 455
i have to open a popup window, i use this code:
window.onbeforeunload = function(){
var windowincass = window.open('../Common/DomandaGenerica.jsp','domandagenerica','url=no,directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,scrolling=no,resizable=no,width=300,height=200,marginwidth=0,marginheight=0,frameborder=0');
}
the windwow opens but it has the menù, url and others.
How can i fix it?
for example i want something like this:
https://i.sstatic.net/hOcXO.png
but i got something like that:
http://www.ajaxshake.com/public/usersFiles/main/ajax-example-windows-aero-style46_user_1_a3e5a.jpg
i have to use IE 9.
Upvotes: 0
Views: 2626
Reputation: 707
If you want a popup like in the first picture, you have to use a html element with basically following css properties, which shows up, when the Popup should be triggered.
CSS
position: absolute;
z-index: 9999;
It is not possible to change the Styles of the operating system with Javascript in all common browsers. And that is what you are trying to do, if you want to hide the title-bar, menu and so on...
Also have a look at:
This corresponds to your purpose.
Upvotes: 1
Reputation: 6451
You are looking to open a overlay popup. For that, I suggest you use some JavaScript library.
jQueryUI dialog is one potential candidate. But there are many more:
window.open() will open new browser instance, and now it's almost always frowned upon. However, even with that you can control the appearance of the popup window to a certain extent by passing in WindowFeatures parameter as explained here (menubar, and status settings can be particularly helpful to you):
https://developer.mozilla.org/en-US/docs/Web/API/Window.open#Position_and_size_features
Upvotes: 1