PDA

View Full Version : Chromeless Window



JOML
05-05-2006, 04:46 PM
Hi all,

I search exactly such a function... but not for a new poup window.

Target is that my "own" page load with this function. That mean when I type a URL into IE, this index.html page have to open without a menu and in fullscreen mode.
(With SP2, the X is still available).

Not that a "first" page has to open the right page.

This page will be not available in the internet (only intranet) so it's not a problem that there is no menu available in the IE.

Thanks in advance :)
JOML

Twey
05-05-2006, 04:54 PM
It is impossible. In fact, even a fully-chromeless popup is not possible, and must be simulated with a div or iframe. To allow this functionality would be a huge risk.
The only way to do this would be to code your own browser.

jscheuer1
05-05-2006, 05:52 PM
IMPORTANT NOTE: These scripts will not work and/or will cause problems in virtually all browsers except IE6. Even in IE6, with aggressive security settings, there could be problems.

For IE only and possibly soon to be rendered impossible in IE7, this or a variation on it is about as close as you can get:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
if (location.href.indexOf('fullmode')<0){
var win;
onload=function(){
for (var i_tem = 0; i_tem < document.links.length; i_tem++)
document.links[i_tem].href='javascript:void(0);'
document.onclick=function(){
win=window.open(location.href+'?fullmode','','fullscreen');
opener=self;
self.close();
}
}
}
</script>
</head>
<body>
Hi<br>
<a href="ad_h.htm">link</a>
</body>
</html>

This will render all links on the page inoperative until one is clicked, that action will open the page in 'fullscreen' mode with the links active.

This version gives the user the choice of staring at a blank page or allowing the pop up to open, with the added fact that if they click anywhere within the page, that too will open the pop up:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
if (location.href.indexOf('fullmode')<0){
var win;
document.onclick=onload=function(){
document.body.style.display='none';
win=window.open(location.href+'?fullmode','','fullscreen');
opener=self;
setInterval("try{if (win.open){self.close()}}catch(e){return}", 5000)
}
}
</script>
</head>
<body>
Hi
<a href="ad_h.htm">link</a>
</body>
</html>

reiyos
07-25-2006, 10:35 PM
This script works very well. I wish to modify it so that it resizes to the bottom of the monitor display. I know how to the do a javascript resize, but I haven't been successful using it with this script. Can someone help me? Does this script have to run in fullmode?

jscheuer1
07-26-2006, 04:00 AM
For that, you would want to open an ordinary window instead of the IE proprietary 'fullmode', 'fullscreen' one. However, you would then be stuck with default chrome, most notably the status bar. You also would have to live with other browsers taking control of how the window opened. I'm not really recommending any of this stuff however. I advocate reserving pop ups for special effects with the important content available on the real page and any important pop up information with an alternative path for non-javascript enabled users as well as an alternate path for blocked pop ups.