|
|
|
 |
|

February 2nd, 2002, 07:53 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Q for any HTML gurus
Simply:
Is there an easy way to put up an alternate image in case the first try fails? Or even make it look as though that happened?
EG: Make an "Online"/"Offline" image using HTML, to indicate whether some remote site is reachable?
__________________
Things you want:
|

February 2nd, 2002, 11:43 AM
|
Private
|
|
Join Date: Oct 2001
Location: memphis,tn,USA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Q for any HTML gurus
Not that I know of, use the alt value to tell what it should be. Now you could php to do it, maybe even javascript. But I'm not sure about javascript, I've never try it.
|

February 2nd, 2002, 05:02 PM
|
General
|
|
Join Date: Jul 2001
Location: Canada
Posts: 4,603
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Q for any HTML gurus
yea.
You could set up a script to ping the remote site.
and just use a simple if statement with the images.
just use vb script or javascript or asp or any pearl or any of the other ones.
Your looking at less than 10 lines. Or as a seperate page of code and just put the link to it in the include div
I should throw XML in there since that is the buzz word of 2002
__________________
RRRRRRRRRRAAAAAGGGGGGGGGHHHHH
old avatar = http://www.shrapnelgames.com/cgi-bin...1051567998.jpg
Hey GUTB where did you go...???
He is still driving his mighty armada at 3 miles per month along the interstellar highway bypass and will be arriving shortly
|

February 2nd, 2002, 08:33 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: Q for any HTML gurus
After searching widely for samples, and rejecting a number of solutions that were quite restrictive, I settled on a homemade solution.
The "Offline" image is replaced by a simple red line, but the system works in both Netscape & IE, and probably any browser that supports images.
I'm a little disappointed that the alternate images didn't pan out, though.
__________________
Things you want:
|

February 2nd, 2002, 11:15 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: Q for any HTML gurus
I have an idea. Make a table cell where you want the on/off line images to go. Make the offline image be the background of that cell. Then, have the Online image load there. If the server is Online, the image loads. If not, it doesn't load and you see the offline message.
|

February 3rd, 2002, 05:05 AM
|
BANNED USER
|
|
Join Date: Jul 2000
Posts: 901
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Q for any HTML gurus
That is how John Beech does it and I will also be using that style for my race styles at SE.org
|

February 3rd, 2002, 05:28 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: Q for any HTML gurus
 That looks great!
Is there any way to erase the border around the broken image?
__________________
Things you want:
|

February 3rd, 2002, 06:16 PM
|
 |
Private
|
|
Join Date: Jan 2002
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Q for any HTML gurus
quote: Originally posted by suicide_junkie:
Is there any way to erase the border around the broken image?
If the border is around the img, add border=0 as a property of the <img> tag. If it is around the table, do the same with the <table> tag. If it is around a table cell, add a "border-width: 0" style attribute to the <td> tag. Otherwise, post a url so I can see what the problem is.
|

February 3rd, 2002, 06:26 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: Q for any HTML gurus
Homepage/Imagepack
When the "Online" image is broken, I get the box.
I have set the Height & width so I don't get the stupid "X" or torn icons, but I still get an image border.
__________________
Things you want:
|

February 3rd, 2002, 10:12 PM
|
 |
Private
|
|
Join Date: Jan 2002
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Q for any HTML gurus
SJ, I looked at your HTML code, you have a <table> within the <table>, the one whose <td> tag has the BACKGROUND property set. Add "BORDER=0" as a property to the inner <table> tag.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|