Error in "Preview" only

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>
 
J

Jens Peter Karlsen[FP MVP]

I would not advice using either. Opening a popup onload will fail in
most browsers because of popup blockers including IE SP2.
Trying to force the window to fill the screen will also fail in some
browsers and in a large proportion of the rest, the users will probably
get mad at you for messing with their preferred browser windowsize and
leave your site.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
C

cookoonest

Re: Error in "Preview" onlyThanks for input Jens.

I am aware that some people have popups blocked, but others (like me) prefer
to not have all of them blocked or have not upgraded to SP2. The popups are
used for important announcements related to current events that have to to
with the website's subject.

I was under the impression that the code I am using does not alter the users
windowsize but only returns the display to "maximized". I am not that into
the coding so if you know this to be incorrect would appreciate knowing.

Thanks again,

Larry

I would not advice using either. Opening a popup onload will fail in most
browsers because of popup blockers including IE SP2.
Trying to force the window to fill the screen will also fail in some
browsers and in a large proportion of the rest, the users will probably get
mad at you for messing with their preferred browser windowsize and leave
your site.
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]]
Posted At: 21. april 2005 03:43
Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Error in "Preview" only


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.outerWi
dth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth; } } //--> </script>
 
R

Ronx

"Returning" the display to maximised does not alter the screen
resolution, but does alter the window size for those users that do not
use a maximised window for the browser.
My screen resolution is 2560x1024 - I do *not* want a browser window
opened to that size! I normally use 800x600 for the browser.

Those users that do have SP2 installed will not see your important
announcements. If they are important, you should provide a prominent
clickable link for them.
FireFox users (20% of the browsers in use today are FireFox) also
blocks onload popups, whether or not WinXP SP2 is in use.
If you know that _none_ of your audience block popups, and never will,
then these comments can be ignored.
--
Ron Symonds
Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

cookoonest said:
Re: Error in "Preview" onlyThanks for input Jens.

I am aware that some people have popups blocked, but others (like
me) prefer to not have all of them blocked or have not upgraded to
SP2. The popups are used for important announcements related to
current events that have to to with the website's subject.

I was under the impression that the code I am using does not alter
the users windowsize but only returns the display to "maximized". I
am not that into the coding so if you know this to be incorrect
would appreciate knowing.

Thanks again,

Larry

I would not advice using either. Opening a popup onload will fail in
most browsers because of popup blockers including IE SP2.
Trying to force the window to fill the screen will also fail in some
browsers and in a large proportion of the rest, the users will
probably get mad at you for messing with their preferred browser
windowsize and leave your site.
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]]
Posted At: 21. april 2005 03:43
Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Error in "Preview" only


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.outerWi
dth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth; } } //--> </script>
 
J

Jens Peter Karlsen[FP MVP]

It sets the browser to fill the entire screen regardless of if they had
it set to that before and since most people with larger monitors usually
has it in a smaller window they wont take too kindly to having it
changed.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]]
Posted At: 21. april 2005 19:18
Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Re: Error in "Preview" only


Re: Error in "Preview" onlyThanks for input Jens.

I am aware that some people have popups blocked, but others
(like me) prefer to not have all of them blocked or have not
upgraded to SP2. The popups are used for important
announcements related to current events that have to to with
the website's subject.

I was under the impression that the code I am using does not
alter the users windowsize but only returns the display to
"maximized". I am not that into the coding so if you know
this to be incorrect would appreciate knowing.

Thanks again,

Larry

message I would not advice using either. Opening a popup onload will
fail in most browsers because of popup blockers including IE SP2.
Trying to force the window to fill the screen will also fail
in some browsers and in a large proportion of the rest, the
users will probably get mad at you for messing with their
preferred browser windowsize and leave your site.
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]] Posted At: 21. april
2005 03:43 Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Error in "Preview" only


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- C 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.outerWi
dth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth; } } //--> </script>
 
C

cookoonest

Re: Error in "Preview" onlyPoints well taken.

Will reconsider use of popups.

Thanks,

Larry
It sets the browser to fill the entire screen regardless of if they had it
set to that before and since most people with larger monitors usually has it
in a smaller window they wont take too kindly to having it changed.
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]]
Posted At: 21. april 2005 19:18
Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Re: Error in "Preview" only


Re: Error in "Preview" onlyThanks for input Jens.

I am aware that some people have popups blocked, but others
(like me) prefer to not have all of them blocked or have not
upgraded to SP2. The popups are used for important
announcements related to current events that have to to with
the website's subject.

I was under the impression that the code I am using does not
alter the users windowsize but only returns the display to
"maximized". I am not that into the coding so if you know
this to be incorrect would appreciate knowing.

Thanks again,

Larry

message I would not advice using either. Opening a popup onload will
fail in most browsers because of popup blockers including IE SP2.
Trying to force the window to fill the screen will also fail
in some browsers and in a large proportion of the rest, the
users will probably get mad at you for messing with their
preferred browser windowsize and leave your site.
Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cookoonest [mailto:[email protected]] Posted At: 21. april
2005 03:43 Posted To: microsoft.public.frontpage.programming
Conversation: Error in "Preview" only
Subject: Error in "Preview" only


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.outerWi
dth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth; } } //--> </script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top