Re: status or error of opened window
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Wed, 11 Jan 2006 15:58:46 +0100
marc wrote:
> If I open a window like this
>
> mywin=window.open("http://localhost:3456/" );
>
> Is there a way to find out, in the calling javascript code, if the
> opened window mywin could read server information from
> "http://localhost:3456/".
>
> I tried mywin.error and mywin.status, but it's not yet clear to me what
> to do.
Window objects have no built-in `error' property. They have a `status'
property that specifies the string value in the window's status bar.
> In mywin, the (Dutch) InternetExplorer version, it can, sometimes say,
> could not open this page. (To be exact: In Dutch "De pagina kan niet
> worden weergegeven".)
You could evaluate properties of mywin.document and their properties to
test for certain content, such as
var o;
if (mywin && !mywin.closed
&& (o = mywin.document)
&& (o = mywin.document.body)
&& o.innerHTML.indexOf("kan niet worden weergegeven") > 0)
{
// handle problem with localhost:3456
}
(RTSL.)
But that would apply for local application and a restricted set of browsers
and configurations only; for example, Firefox before version 1.5 did not
display a local error document but an error message box; in IE, the level
of verbosity of local error documents is user-defined.
PointedEars
.
- Follow-Ups:
- Re: status or error of opened window
- From: marc
- Re: status or error of opened window
- References:
- status or error of opened window
- From: marc
- status or error of opened window
- Prev by Date: Re: beginner: unique values in an array
- Next by Date: Re: beginner: unique values in an array
- Previous by thread: status or error of opened window
- Next by thread: Re: status or error of opened window
- Index(es):
Relevant Pages
|
Loading