Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting with a javascript if a page is accessible.

Status
Not open for further replies.

clarissa1996

Technical User
Jan 31, 2002
78
0
0
CH
Hi all,

I need do write a javascript that try to start a perl program on a remote host (HOST A). Il the remote host is down the javscript must start the same program on HOST B.

Is it possible ?
How can I detect with a javascript if a page is accessible ?

I have no idea how I can do this.

Any help are appreciated. Clarissa
 

Rather than detecting if a page is available, you could detect if the host was available, and use the other host if not. If that is an acceptable compromise, check out my post from last week:

thread216-1041234

If you made the URL of the image point to host a, and it was not available, you could then switch to host b.

I am amazed at the number of uses that this code has - given that it was originally written to detect image sizes client-side!

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top