473,545 Members | 1,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

client page status

I want to create a small app where a client goes to a website, and from
that page they can click a button and see what predefined URL's are
reachable by them. If a URL is unreachable or down, then I want to
return a message to the client with the http error code. I was able to
create a server side application that does this from the servers
perspective using php, but I now want to get the clients perspective.
Any ideas on how to do this, or any reference to some code on where
this has been done.

Thanks!

Apr 3 '06 #1
2 1253
tr****@gmail.co m said on 04/04/2006 7:10 AM AEST:
I want to create a small app where a client goes to a website, and from
that page they can click a button and see what predefined URL's are
reachable by them. If a URL is unreachable or down, then I want to
return a message to the client with the http error code. I was able to
create a server side application that does this from the servers
perspective using php, but I now want to get the clients perspective.
Any ideas on how to do this, or any reference to some code on where
this has been done.


From tha group FAQ:

<URL:http://www.jibbering.c om/FAQ/#FAQ4_34>

which leads to:

<URL:http://jibbering.com/2002/4/httprequest.htm l>
--
Rob
Group FAQ: <URL:http://www.jibbering.c om/FAQ>
Apr 3 '06 #2
Thanks! Here is how I implemented it for future reference...

<html>
<head>
<script type="text/javascript">
var xmlhttp

function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttp Request)
{
xmlhttp=new XMLHttpRequest( )
xmlhttp.onready statechange=sta te_Change
xmlhttp.open("G ET",url,true)
xmlhttp.send(nu ll)
}
// code for IE
else if (window.ActiveX Object)
{
xmlhttp=new ActiveXObject(" Microsoft.XMLHT TP")
if (xmlhttp)
{
xmlhttp.onready statechange=sta te_Change
xmlhttp.open("G ET",url,true)
document.getEle mentById('A1'). innerHTML=url
xmlhttp.send()
}
}
}

function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyS tate==4)
{
clearPreloadPag e();
document.getEle mentById('A2'). innerHTML=xmlht tp.status
document.getEle mentById('A3'). innerHTML=xmlht tp.statusText
}
}

</script>
</head>

<body onload="loadXML Doc('http://www.google.com: 8080');">
<p>

<b>URL:</b>
<span id="A1"></span>

<br><b>status :</b>
<span id="A2"></span>

<br><b>status text:</b>
<span id="A3"></span>
</p>

</body>
</html>

Apr 4 '06 #3

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

Similar topics

5
6290
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. However, I have a script that absolutely MUST finish one it's been started--is there a way to cause the entire script to execute, even if the client...
8
2075
by: Jazzis | last post by:
If I want to execute an ASP page and get NOTHING in return, no HTL Headers as well? response.clear clears only the contents, but HTML Header is still returned. Thanks for your time. Adam
15
4455
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do computations, the only data transfered is user mouse/kbd input. It works synchronously, but somehow, when I play in client window, both client and ...
4
6562
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were...
2
2384
by: jslaybaugh | last post by:
I am trying to bind to a GridView or DetailsView after a callback using the ClientCallback Manager in the new .NET 2.0 framework. See below for the HTML followed by the VB code: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> function GetEmployeeInfo(empID)
0
7459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7653
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. ...
0
7803
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...
1
7411
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...
0
5965
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4942
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...
0
3439
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1871
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.