Is there some way to load one image if another doesn't load instead of having the generic browser image placeholder? I saw some javascript that looked promising but didn't work. Does anyone know if this can be done?
Announcement
Collapse
No announcement yet.
no image load
Collapse
X
-
Do you mean something like this?:
<img name="myImage" SRC="first.gif" lowsrc="second.gif">
Not 100% sure this is what you are looking for, but figured it was worth mentioning.
EDIT: We posted @ almost the same time Dave. Well...at least there are a couple of options now
. (Not sure mine is too valid though, I've never had occasion to use lowsrc).
Last edited by boxer_1; Jun 30, 2002, 06:21 PM.boxer_1
CodingForum Moderator
"How did a fool and his money get together in the first place?"
-
lowsrc
Thanks for the replies. I'm going to try both options out. I have never seen the "lowsrc" tag before. How exactly is it used and what does it do? I tried it out but the lowsrc never loads regardless of whether there is a first image.
Comment
-
Re: lowsrc
Originally posted by blake74
Thanks for the replies. I'm going to try both options out. I have never seen the "lowsrc" tag before. How exactly is it used and what does it do? I tried it out but the lowsrc never loads regardless of whether there is a first image.
Not of much relevance to your question.boxer_1
CodingForum Moderator
"How did a fool and his money get together in the first place?"
Comment
-
onError
The onError code works great with basic html page! However, if I try to use it as output from a cgi script it causes an error in the script and so the script then doesn't work. I'm guessing it might be with the semicolon (character, maybe not. Does anyone know how to fix this or make it compatable?
Comment
-
Anyone know how I can get this idea to work right?:
<img src="pics/test.jp2"
border="0"
onError="document.write('No JPG2000');">
Seems to work, but makes IE continue to do something and takes 2 steps back to get out of the page it's on...Quيet Storm Designs ~ Art is not what you see, but what you make others see.
· the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·
Comment
-
<html>
<head>
<title>untitled</title>
</head>
<body>
<img src="pics/test.jp2" border="0"
onerror="this.src='http://www.codingforum.net/images/smilies/mad.gif';
document.getElementById('message').innerHTML='No JPG2000'">
<span id="message" style="font:bold 12px arial;color:red;"></span>
</body>
</html>
Comment
-
And there it is!
Works perfect! Grasias!Quيet Storm Designs ~ Art is not what you see, but what you make others see.
· the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·
Comment
-
This may be far fetched, but I am no javascript wizard. Just as the onError works with images, is there something that can be set up so that if a specific text word shows up it will be omitted from showing? Such as if the word 'included' keeps showing up from a cgi output. If I don't want users to see this, can it be omitted from showing or even have the text color automatically change to the color of the page background so it blends in?
Comment
-
Hi.....I have written a script for the same.
Its at http://www.geocities.com/e_i_search/...ror-finder.htm
Comment
-
Hello premshree..I have a cgi script that is outputting the word "included" from a text file. I don't want the "included" word to show. Is there any way that you know of that will check to see if the word ouputted is "included" and if so no show it or even change the color of it so it'll blend into the background? Like something in the <font> tag or something?
Comment
Comment