Open new popup window without address bars nor toolbars in firefox & IE (uses Javascript). See also http://www.w3schools.com/jsref/met_win_open.asp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>Index</title> | |
<script type="text/javascript"> | |
var _MsgWindowOpenError = 'Un mécanisme de blocage des fenêtres instantanées a été détecté dans votre navigateur Web. Ce type de mécanisme empêche le bon fonctionnement de cette application. Désactivez le mécanisme de blocage des fenêtres instantanées ou autorisez les fenêtres liées à ce site.'; | |
var _MsgWindowOpenError2 = 'Attention le filtre anti-popups est activé ou le niveau de sécurité de Internet Explorer n\'est pas correctement configuré.'; | |
function openPopup() | |
{ | |
if (window.name != "nouvelle") | |
{ | |
var options = "toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes"; | |
var url = "target-popup.html"; | |
var newWin = window.open(url, "nouvelle", options); | |
if (newWin == null) | |
{ | |
// window.status = "Nouvelle fenetre null : popup bloquée !"; | |
window.alert(_MsgWindowOpenError); | |
} | |
else if (window.top != newWin) | |
{ | |
window.opener = window.self; | |
window.self.close(); | |
} | |
} | |
} | |
</script> | |
</head> | |
<body onload="openPopup()"> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>New window from popup</title> | |
</head> | |
<body> | |
This page must be opened in a new window without toolbars... | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses Javascript.
See also Window open() Method