Click to See Complete Forum and Search --> : Alternate Images
TKNick
04-11-2003, 10:06 PM
I don't know if it's possible in HTML or JS, or PHP. People have told me you can do it in all, so I'm just trying HTML. Anyway, I don't have any experience in any languages other than HTML. But I need a script that displays an image, if it can't (404, red x, ect), it displays a different image. I mainly want to do this to show the status of my game server.
Thanks for any help.
This would probably require a server-side language... Although it's probably possible with Javascript...
TKNick
04-11-2003, 10:43 PM
It looks like CMM is looking for money for help. I'll post on the Java board. I've seen someone do it before, and I believe he did it in JS.
Thanks.
Looking for money for help? We're not looking for money for help... I am a member of CMM that is helping you for free. Do you think I expect pay?
By the way, I don't think this can be done with JavaScript. I really doubt it's possible without a server-side language to see if the file exists on the server.
TKNick
04-12-2003, 01:31 AM
Ah, didn't know you were part of CMM :). Yeah, someone in the Javascript section told me that, and showed me a script. I tried it, but I don't know how exactly to use it, so I posted what I tried. Thanks for the help.
You have to have a server that supports the language used, most likely PHP (if AdamBrill or Pyro replied :p).
Klyve1
04-12-2003, 09:46 AM
Well it could be done with PHP, is it supported?
Probably a very late reply, but here's what I found in my spare time:
http://webdeveloper.earthweb.com/webjs/item.php/90721
khalidali63
04-28-2003, 03:15 PM
Ok..I just saw this thread...:D
Here is how one can find out if the server is up or not using javascript..by the way its a hack,not a real language solution)..
http://68.145.35.86/skills/javascripts/FindOutAServerIsUp.html
jeffmott
04-28-2003, 05:31 PM
This can in fact be done simply with the OBJECT element.
See http://www.w3.org/TR/html401/struct/objects.html#edef-OBJECT
However, support for this element is very loose so it may take some fiddling to get it to appear like you want.