This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > FrontPage Programming > April 2005 > Error in "Preview" only





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Error in "Preview" only
cookoonest

2005-04-20, 11:31 pm

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>


Jens Peter Karlsen[FP MVP]

2005-04-21, 4:35 am

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:cookoonest@hotmail.com]
> 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>
>
>


cookoonest

2005-04-21, 8:19 pm

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

"Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in message
news:uWPwZmjRFHA.1348@TK2MSFTNGP15.phx.gbl...
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:cookoonest@hotmail.com]
> 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>
>
>


Ronx

2005-04-21, 8:19 pm

"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" <cookoonest@hotmail.com> wrote in message
news:zfR9e.1660$JB.420@tornado.socal.rr.com...
> 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
>
> "Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in message
> news:uWPwZmjRFHA.1348@TK2MSFTNGP15.phx.gbl...
> 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.
>



Jens Peter Karlsen[FP MVP]

2005-04-21, 8:19 pm

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:cookoonest@hotmail.com]
> 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
>
> "Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in
> message news:uWPwZmjRFHA.1348@TK2MSFTNGP15.phx.gbl...
> 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.
> 21. april
> (www.dynamicdrive.com)
>


cookoonest

2005-04-22, 4:20 am

Re: Error in "Preview" onlyPoints well taken.

Will reconsider use of popups.

Thanks,

Larry
"Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in message
news:OdcLyaqRFHA.508@TK2MSFTNGP12.phx.gbl...
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:cookoonest@hotmail.com]
> 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
>
> "Jens Peter Karlsen[FP MVP]" <jpkarlsen@mvps.org> wrote in
> message news:uWPwZmjRFHA.1348@TK2MSFTNGP15.phx.gbl...
> 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.
> 21. april
> (www.dynamicdrive.com)
>


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews