Re: "Access is denied" using dhtml - window.moveTo( 0, 0);
- From: "Ardax" <Ardax@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 22:37:02 -0700
Hi again!
The answer of your question is that it is already on the desktop.
I have done some more testing and this is what I have come up with.
I have a web page called www.dn.se (swedish newspaper) as the browsers
default startup page and it seems like the error "Access is denied" only
occurs (not always) then I have wisited this site (done some clicking) and
then return to my work by entering the address to it in the browsers address
field.
If I start a new browser and halts the load of the default startup page I
have not yet experienced the error "Access is denied" then I try to move the
browser by java code.
This is a very strange error since it seems like there is somthing hanging
on from the www.dn.se site. Is there any way to reset the I.E. browsers
(version 4.01 and up) completely then loading new pages into them?
Thanks, Ardax
"RobB" wrote:
>
> Ardax wrote:
> > Hi!
> >
> > I am trying to move IE to the top left of the screen with the dhtml
> command
> > window.moveTo(0, 0); and then I get the runtime error message "Access
> is
> > denied.". This happens very rarly, about 1 time of 50 but I would
> like to
> > catch this error or be able to check some sort of status flag to see
> if the
> > window.moveTo(0, 0); command is available at that particular point in
> time.
> > The window object is the top window for several underlying frames.
> >
> > The things I have tried is:
> > 1. To make sure that the document.readyState flag have the status
> "complete"
> > for all underlying frames.
> > 2. To set focus to the window by window.focus(); before calling
> > window.moveTo(0, 0);.
> > 3. To use try catch since I am using javascript and it works but not
> for
> > older java versions that also must be able to handle the error.
> > 4. To use window.onerror but it will not fire the event. I have tried
> to
> > create other errors and the event has fired but it will not fire for
> "Access
> > is denied".
> >
> > The solution must work on IE 4.01 and up.
> >
> > Thanks, Ardax
>
> What's the precise scenario involved? Is this a window that has just
> been opened or is already on the desktop? You can do this with 100%
> reliability by putting this function in the same script as the window
> opening code:
>
> function topleft()
> {
> return '<body onload="moveTo(0,0)"></body>';
> }
>
> ....and doing the open like so:
>
> foo = window.open('javascript:opener.topleft()','foo')
>
> This loads the favelet which executes the script; access is guaranteed
> as the process is synchronous, you're just loading a 'document'. You
> can then load a real file using window.open('file.html','foo', '.....)
>
>
.
- References:
- Prev by Date: Re: CreateObject
- Next by Date: IExplore problem
- Previous by thread: Re: "Access is denied" using dhtml - window.moveTo( 0, 0);
- Next by thread: Re: "Access is denied" using dhtml - window.moveTo( 0, 0);
- Index(es):
Relevant Pages
|