|
|
|
date: Wed, 3 May 2006 06:50:03 -0700,
group: microsoft.public.inetsdk.programming.scripting.jscript
back
Dialog box appears when closing a window in IE 7 but not in IE 5 a
I need to hide the navigation toolbar and the URL address bar when a user
access the web site. In order to achieve this I included the following
JScript in my index.html:
-----------------------------------------------------------------------------
<script language="JavaScript">
function loadMainWindow()
{
var win = window.self;
win.opener = window.self;
var newloc = "http://www.yahoo.com";
var ih = (window.window.screen.availHeight - 60) - 100;
var iw = (window.window.screen.availWidth - 10) - 100;
var it = ((window.window.screen.availHeight - 60) - ih) / 2;
var il = ((window.window.screen.availWidth - 10) - iw) / 2;
var features =
"directories=no,menubar=no,location=no,toolbar=no,status=yes,scrollbars=yes,resizable=yes"
+ ",width=" + iw + ",height=" + ih + ",top=" + it + ",left=" + il + "";
v1 = new Date();
v2 = Date.parse(v1);
v3 = "pg" + v2;
var oNewWindow = window.open(newloc, v3, features);
oNewWindow.focus();
win.close();
}
function window.onload()
{
try
{
loadMainWindow();
}
catch(e)
{
popUpMessage.style.display = 'block';
}
}
</script>
-----------------------------------------------------------------------------------------
This script works fine on IE-5 and IE-6, but on IE-7 it shows a dialog
message. How can I find a solution for this.
date: Wed, 3 May 2006 06:50:03 -0700
author: Joseph
Re: Dialog box appears when closing a window in IE 7 but not in IE 5 a
Joseph wrote:
> I need to hide the navigation toolbar and the URL address bar when a
> user access the web site. In order to achieve this I included the
> following JScript in my index.html:
> -----------------------------------------------------------------------------
> <script language="JavaScript">
> function loadMainWindow()
> {
> var win = window.self;
> win.opener = window.self;
IE 7 closes the longstanding opener assignment loophole above...
Tip: Do a find for window.opener on the page below.
Internet Explorer Developer Center: Release Notes for Internet Explorer 7
Beta 2
http://msdn.microsoft.com/ie/releasenotes/default.aspx
> var newloc = "http://www.yahoo.com";
> var ih = (window.window.screen.availHeight - 60) - 100;
> var iw = (window.window.screen.availWidth - 10) - 100;
> var it = ((window.window.screen.availHeight - 60) - ih) / 2;
> var il = ((window.window.screen.availWidth - 10) - iw) / 2;
> var features =
> "directories=no,menubar=no,location=no,toolbar=no,status=yes,scrollbars=yes,resizable=yes"
> + ",width=" + iw + ",height=" + ih + ",top=" + it + ",left=" + il +
> ""; v1 = new Date();
> v2 = Date.parse(v1);
> v3 = "pg" + v2;
> var oNewWindow = window.open(newloc, v3, features);
> oNewWindow.focus();
> win.close();
> }
>
> function window.onload()
> {
> try
> {
> loadMainWindow();
> }
> catch(e)
> {
> popUpMessage.style.display = 'block';
> }
> }
> </script>
> -----------------------------------------------------------------------------------------
>
> This script works fine on IE-5 and IE-6, but on IE-7 it shows a dialog
> message. How can I find a solution for this.
--
Michael Harris
Microsoft MVP Scripting
date: Wed, 3 May 2006 15:48:59 -0700
author: Michael Harris \(MVP\) mikhar at mvps dot org
Re: Dialog box appears when closing a window in IE 7 but not in IE 5 a
Do not start your impression by "hidding" anything
from the user.
Most users nowadays, don't go to outhouses anymore,
when they need to pee.
They will sit right "there" when it loaded and happened.
"Joseph" wrote in message
news:3DCAF28C-DD40-4364-A9C1-EC183875222F@microsoft.com...
> I need to hide the navigation toolbar and the URL address bar when a user
> access the web site. In order to achieve this I included the following
> JScript in my index.html:
> --------------------------------------------------------------------------
---
> <script language="JavaScript">
> function loadMainWindow()
> {
> var win = window.self;
> win.opener = window.self;
> var newloc = "http://www.yahoo.com";
> var ih = (window.window.screen.availHeight - 60) - 100;
> var iw = (window.window.screen.availWidth - 10) - 100;
> var it = ((window.window.screen.availHeight - 60) - ih) / 2;
> var il = ((window.window.screen.availWidth - 10) - iw) / 2;
> var features =
>
"directories=no,menubar=no,location=no,toolbar=no,status=yes,scrollbars=yes,
resizable=yes"
> + ",width=" + iw + ",height=" + ih + ",top=" + it + ",left=" + il + "";
> v1 = new Date();
> v2 = Date.parse(v1);
> v3 = "pg" + v2;
> var oNewWindow = window.open(newloc, v3, features);
> oNewWindow.focus();
> win.close();
> }
>
> function window.onload()
> {
> try
> {
> loadMainWindow();
> }
> catch(e)
> {
> popUpMessage.style.display = 'block';
> }
> }
> </script>
> --------------------------------------------------------------------------
---------------
>
> This script works fine on IE-5 and IE-6, but on IE-7 it shows a dialog
> message. How can I find a solution for this.
>
date: Fri, 19 May 2006 02:56:23 -0400
author: asdf
|
|