473,803 Members | 3,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

status or error of opened window

If I open a window like this

mywin=window.op en("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.

In mywin, the (Dutch) InternetExplore r version, it can, sometimes say,
could not open this page. (To be exact: In Dutch "De pagina kan niet
worden weergegeven".)

My goal is actually to find out, if there is something running on
localhost that is listening on port 3456. There might be other ways to
do this then checking mywin even..???

Jan 11 '06 #1
3 1542
marc wrote:
If I open a window like this

mywin=window.op en("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) InternetExplore r 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.in dexOf("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
Jan 11 '06 #2
marc wrote:
If I open a window like this

mywin=window.op en("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) InternetExplore r 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.ind exOf("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
Jan 11 '06 #3
Thomas:
var o;
if (mywin && !mywin.closed
&& (o = mywin.document)
&& (o = mywin.document. body)
&& o.innerHTML.ind exOf("kan niet worden weergegeven") > 0)
{
// handle problem with localhost:3456
}


I think this probably could not work because the opened window is not
synchronized with the opener window. Hence this javascript code won't
wait for the opened window to find the url, there is no control when

o.innerHTML.ind exOf("kan niet worden weergegeven")

is called. Probably it is called when an other system thread is opening
a new browser Window O.S. browser-window, before the 2nd browser tries
to reach the url.
I tried the code, it does not seem to work.

So it seems I have to solve my problem differently, not with changes in
my javascript.

Jan 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4730
by: mark4asp | last post by:
Why won't the window.status message change ? IE ver. 6.0.2800.1106 displays the tooltip OK. <td> <A HREF="editAuthor.asp?item=4" title="Edit author details" onMouseOver="window.status=this.title" onMouseOut="window.status=''">Micky Mouse</A> </td>
9
3136
by: Ian Shere | last post by:
I have a disclaimer page prior to a visitor going to my FAQ page. I want to hide the link which normally appears in the status bar from visitors seeing it. I am using the following code which works fine except that the "I Agree" link still shows the link path. What's wrong - driving me nuts!!?? <script language="JavaScript"> <!-- Hide the script from old browsers --
2
1826
by: Mike May | last post by:
Hi IE6 Win2k The javascript FAQ describes how you can retain a reference to a window that you have opened and manipulate the window - focus on it or close it, viz: 4.10 How do I check to see if a childwindow is open, before opening another? var myWin=null; function openWin(aURL) {
3
4596
by: Pandora Law | last post by:
This probably belongs more correctly in an IE5 newsgroup since it relates to use on a machine that has IE 5.00.3314, but I can't find a suitable group .... and I cant locate an answer on Google groups. My question is this ... if a window has been opened using a function like this function Graphic(GraphicURL) { NewWindow = window.open ( GraphicURL, "DisplayWindow", "toolbar=no,location=no,directories=no,status=no,
3
3555
by: Colin Graham | last post by:
I am working with a piece of javascript that i have inherited from another developer. It is for a date picker function and it runs fine locally but i get an error when i deploy it on the server and run it. Can anyone help me with my issue i get a permission denied error also when the error begins. i get the error on the folowing part of the codee: window.opener.Form1.txtDate.value = '05/10/2004' The complete line of code is
42
34247
by: Greg | last post by:
Hi, I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox 1.07/Linux, Firefox 1.5/Linux, Firefox 1.5/Windows and Firefox 1.5/Mac, Safari/Mac. It works perfectly on a lot of configurations but, on some PC with Firefox 1.5/Windows (not all), the Javascript code with XmlHttpRequest
9
2249
by: Simon Wigzell | last post by:
I have a little asp progress bar window that I open up with javascript, sized and located, all the extras turned off. It works by refreshing itself every second and displaying how much a file upload has progressed. (This is a paid for 3rd party thing so don't ask me to change the way it works!) Even though I have "status=no" in the javascript window.open statment it has a status bar and every second the status bar does its thing where it...
9
2864
by: loga123 | last post by:
I am using asp .net 2.0. I have a hyperlink asp control on my web page page1.aspx. On clicking this hyper;link, I would like to open page2.aspx (which is in the same web application) in a new IE window without scrollbars, status bar, tool bar and with specified height and width. Can it be done on "onload" event of the page2.aspx in javascript?
18
4155
by: mistral | last post by:
Is there some other (more advanced) effects for status bar, other than standard Scroller Bar, TypeWriter Scroller, Flashing Bar, Decrypter, Ticker, World Clock?
0
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.