C
cookoonest
When I use the below script to ensure that new windows open maximized I get
an error in Preview. Running in browser locally and on the server works
fine. Also, if I click "Yes" or "No" on the error box the error goes away
and it continues on fine after that.
The reason I am using this is that I have a small popup window that is
onloaded from the index page when entering the site. When I link to another
page from the menu bar (after closing the popup) it comes up the same size
as the popup. The code below fixes this but causes a javascript error in
"preview" when I'm using Frontpage (2003).
The URL on the error message is "file://C:\Documents and Settings\My
Name\Local Settings\Temporary Internet Files\FrontPageTempDir\pvw1.htm" and
it says "Access is denied" Code 0.
Maybe there is some way to return the screen size to maximized after the
popup is closed???
Any ideas would be appreciated.
Larry
Javascript code ********************************
<script language="JavaScript1.2">
<!--
/***********************************************
* Auto Maximize Window Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for this script and 100's more.
***********************************************/
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if
(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
an error in Preview. Running in browser locally and on the server works
fine. Also, if I click "Yes" or "No" on the error box the error goes away
and it continues on fine after that.
The reason I am using this is that I have a small popup window that is
onloaded from the index page when entering the site. When I link to another
page from the menu bar (after closing the popup) it comes up the same size
as the popup. The code below fixes this but causes a javascript error in
"preview" when I'm using Frontpage (2003).
The URL on the error message is "file://C:\Documents and Settings\My
Name\Local Settings\Temporary Internet Files\FrontPageTempDir\pvw1.htm" and
it says "Access is denied" Code 0.
Maybe there is some way to return the screen size to maximized after the
popup is closed???
Any ideas would be appreciated.
Larry
Javascript code ********************************
<script language="JavaScript1.2">
<!--
/***********************************************
* Auto Maximize Window Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for this script and 100's more.
***********************************************/
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if
(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>