Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Location
    UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Online/Offline Message?

    Hello, i was wondering whether there is any code available to display an 'Offline' image when one of my mirrors for my site is offline and an 'online' image when they are online.
    Here is the page so far, as you can see the 'online' image is stored on that server, so when its offline the image doesnt show.

    I think this isnt very professional though

    Any help would be great, cheers

  • #2
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    What you're asking require server side interaction (to connect to the server), which JavaScript cannot do. I'm transfering this thread to the appropriate forum.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could try this:

    <img src="file on the other server.jpg" onerror="this.src='offline.gif';">...

    might be helpful
    Last edited by redhead; 09-25-2002 at 09:38 PM.
    redhead


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •